Hey, I would like to have two different apps (nuxt apps) one for staging (testing things) and one for production. I set those up under Apps and everything is running so far. But how can I distinguish between production and staging environment?
For production I use following run command NODE_ENV=production yarn start
But if I do this for staging somehow it doesn’t work!
By now I have set an Environment Variable NODE_ENV=staging and use the run command: yarn start
But I got told I should not set NODE_ENV as env vars at all!
So what can I do? What is the correct approach here!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi @alexandergutheil,
After going over the Community, I found a similar question here:
https://www.digitalocean.com/community/questions/how-to-handle-a-staging-production-pipelin-with-app-platform
It’s not exactly the same but it can be used as examples or suggestions on how to continue.
Additionally, according to this Docs:
https://docs.digitalocean.com/products/app-platform/how-to/use-environment-variables/
You can use the vars.