Gillette
Explore posts from serversNuxt ENV not working in docker container
Apparently, by default, Nuxt only reads system envs that start with "NUXT_", example: "NUXT_DBHOST". So there are 2 solutions:
- Change the env names in the docker compose, and add the NUXT prefix to all of them.
- Configure nuxt to remove/change the prefix (https://github.com/unjs/nitro/issues/1836#issuecomment-1770116095).
This can be done by adding the following to nuxt config:
5 replies