#Help deploy with Dockerfile

25 messages · Page 1 of 1 (latest)

keen kraken
cyan mistBOT
#

Project ID: 630f2dde-3530-473f-8c82-5dd7fd43d7a7

keen kraken
#

630f2dde-3530-473f-8c82-5dd7fd43d7a7

fossil peak
#

I'm running into the same issue as well!

dusky temple
#

sang, list every variable you need available at build time please

dusky temple
keen kraken
#

Hi Brody, I feel like we have similar issue.

#

Currently my app need (values are fake)

NEXTAUTH_SECRET=topsecret
NEXTAUTH_URL=https://yourdomain.com
DATABASE_URL=postgres://....

SMTP_USER=yoursmtpuser
SMTP_PASSWORD=yoursmtppass
SMTP_HOST=yoursmtpserver
SMTP_PORT=587

But when it builds, it shows the first error message:

#16 66.13 Error: NEXTAUTH_SECRET variable is not defined

which is not correct because I have all and building by using github source code is ok before

dusky temple
#

it is correct, its not defined, you need to define it in your dockerfile
ARG NEXTAUTH_SECRET
but i think you where misinterpreting what i said, it would be great if voi could deploy from a docker image, not a repo with a dockerfile

keen kraken
#

ok my bad 🙈

#

but I have docker image, let me grab a link for you

dusky temple
#

of course you still need a Dockerfile to prebuild an image, but you also need to make your app read the NEXTAUTH_SECRET during runtime so that the user can supply it

keen kraken
#

I just include that file into my source code at the same time

dusky temple
#

cool now use that image in your template instead of a repo

keen kraken
#

thanks, I will add the ARG and try again 🙏

keen kraken
#

look like it works 😄

dusky temple
#

right but dont you want the user to specify that? if you are baking it into your image then thats no good

keen kraken
#

hmmm I dont understand what do you mean, I added only

ARG NEXTAUTH_SECRET
ARG NEXTAUTH_URL
ARG DATABASE_URL
ARG EMAIL_FROM
ARG SMTP_USER
ARG SMTP_PASSWORD
ARG SMTP_HOST
ARG SMTP_PORT
...

to the top of the Dockerfile and redeploy, Railway made it just work...

dusky temple
#

but you want to use an image in your template

keen kraken
#

in the build log it says like this, so I guess it use the Dockerfile?

dusky temple
#

right but you want the template to deploy voi from an image

keen kraken
#

ahhhh the template

#

damn I need coffeeeeee