Can I use a project wide environmental variable for domain?
I've multiple apps in my project and they use subdomains from a single domain, is it possible to set a project env and use that env value while adding domains to individual apps?
10 Replies
No
so if I want to change my domain, I'll have to do it for each app?
also where are the project env stored? I can't find them anywhere in my dokploy directory
In the database
You can use env variables, but you have to write out the labels manually on each compose. I.e. you can't use the domain tab
Cool, I'll try this. Thanks
also what is the easiest way tk migrate dokploy to some other system.
Earlier I was using docker-composes and on the new system i just copied them and ran them, can i do this plug n play with dokploy?
Migrate compose -> dokploy or dokploy -> dokploy? You said both
dokploy to dokploy
There is no built in solution for that. You would have to manually copy what you need over.
okay, so i will have to setup each app like i did earlier?
Yup. Volumes has to be moved manually over
follow up on this
>You can use env variables, but you have to write out the labels manually on each compose. I.e. you can't use the domain tab
I'm having some trouble to use project env. I added a project env using the ui
"ABCD=localhost"
now in one of my docker compose under service.environment, i wrote
ABCD=${{ABCD}}
this throws invalid interpolation format
if I use
ABCD=${ABCD} it throws no vaue set for ABCD (which i think is thr expected behaviour). So how exactly do i use project ENV, in a service?
I've tried ${{project.ABCD}} as well
got it working, i was putting this in the wrong place