Skip to content
Discussion options

You must be logged in to vote

I think this is probably caused by when config:cache / optimize is being run.

If those commands run during the Docker image build, Laravel writes the resolved config values into bootstrap/cache/config.php at build time. So the cached config reflects whatever environment existed while the image was built, not necessarily the environment that exists later when Render starts the container.

That would explain why printenv can show the runtime variables inside the container, while Laravel still behaves as if APP_KEY / other config values are missing or stale. The runtime env exists, but Laravel is reading from the already-cached config file.

Laravel’s docs mention that after config is cached, …

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@mikefrancis
Comment options

@mikefrancis
Comment options

@dunglas
Comment options

@mikefrancis
Comment options

@dunglas
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mikefrancis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
3 participants
Converted from issue

This discussion was converted from issue #991 on August 22, 2024 13:09.