Hey all,
I'm trying to deploy a Nuxt app in production and need to host it somewhere where I'll not need to worry about execution time - so I opted for a vps.
Premise:
I have a typed environment that checks process.env when starting (it's imported in the nuxt.config file). So to build I have to pass the env variables to it.
However, when I try to start the node server from the .output folder, the env variables are again undefined and the .env file appears to not be read correctly. How can I have it read that file? I know that using pm2 you can specify env vars in the ecosystem configuration but I would like to avoid doing that.
Same thing with docker; when building the image I specify some random values (project is open source, I would like to avoid having all those keys visible in the generated image), but it looks like when I try to run it with --env-file, it does not pick them up. (probably related to the same thing in the classic node server ?
Has anyone managed to make a setup like this work ?