Nextjs 13 Environmental variable

Hello! I recently installed Nextjs to try out the "new" app directory, because I heard server actions are cool. I am using a Dockerfile to deploy, and before I run the build command, I also inject the env variables like this: ARG tmp ENV NEXT_PUBLIC_TMP=$tmp For some reason I can deploy without any problems but when I navigate to the project, I instantly get a message that it cant see the environmental variables. Has anyone had this problem before?
Solution:
no need for ENV just do ARG NEXT_PUBLIC_TMP assuming the variable next wants is NEXT_PUBLIC_TMP after all
Jump to solution
5 Replies
Percy
Percy16mo ago
Project ID: N/A
double_ducker
double_duckerOP16mo ago
N/A
Solution
Brody
Brody16mo ago
no need for ENV just do ARG NEXT_PUBLIC_TMP assuming the variable next wants is NEXT_PUBLIC_TMP after all
double_ducker
double_duckerOP16mo ago
Okay, I am going to give it a try It works perfectly! Thanks
Brody
Brody16mo ago
awesome!
Want results from more Discord servers?
Add your server