Skip to content

Building Docker container without database connection? #1013

Closed Answered by marcklingen
Manouchehri asked this question in Support
Discussion options

You must be logged in to vote

Agree, this does not really make sense as none of the secrets are used to build the container. This is a weird fallout of validating environment variables/secrets using https://github.com/t3-oss/t3-env

In the meantime you can use fake strings at build time. Here's what we use to build the application in CD:

DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
NEXTAUTH_SECRET: "secret"
SALT: "salt"
NEXTAUTH_URL: "http://localhost:3030"

There is a fix outlined here: t3-oss/t3-env#85 to skip validation at build time. I created an issue for this.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
8 replies
@marcklingen
Comment options

@Manouchehri
Comment options

@marcklingen
Comment options

@Manouchehri
Comment options

@marcklingen
Comment options

Answer selected by Manouchehri
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants