No matter what I do, setting the MONGO_URI in service variables fails and gives undefined.
I tried:
- setting it with ?retryWrites=true&w=majority suffix and without
- adding it as a secret
- adding it with quotation marks
- writing it as a literal string in constants/index.js
- with and without explicitly setting production environment for the deployment and making sure dotenv is not used in the deployment
- adding it as APP_MONGO_URI
What am I missing??
Deployment settings (showing I have MONGO_URI set):
{"name":"match-platform","type":"WEB","strategy":{"type":"DEPLOYMENT_STRATEGY_TYPE_ROLLING"},"routes":[{"port":8080,"path":"/"}],"ports":[{"port":8080,"protocol":"http"}],"env":[{"scopes":["region:fra"],"key":"MONGO_URI","value":"mongodb+srv://fgaletic:<password>@couplis.w8n7v.mongodb.net/Couplis/?retryWrites=true&w=majority"}],"regions":["fra"],"scalings":[{"scopes":["region:fra"],"min":1,"max":1,"targets":[]}],"instance_types":[{"scopes":["region:fra"],"type":"free"}],"health_checks":[{"grace_period":5,"interval":30,"restart_limit":3,"timeout":5,"tcp":{"port":8080}}],"volumes":[],"files":[],"skip_cache":false,"git":{"repository":"github.com/fgaletic/match-platform","branch":"main","tag":"","sha":"","build_command":"","run_command":"","no_deploy_on_push":false,"workdir":"","buildpack":{"build_command":"","run_command":"","privileged":false}}}