D
Dokploy•6mo ago
David

Where is located the env file related to CLI environment settings?

Hi! When using docker-compose, I'd like to provide an env file in docker-compose.yaml rather than repeating all my variables one by one like this:
environment:
FAPI_ENVIRONMENT: ${FAPI_ENVIRONMENT}
FAPI_FRONT_URL: ${FAPI_FRONT_URL}
FAPI_BACK_URL: ${FAPI_BACK_URL}
environment:
FAPI_ENVIRONMENT: ${FAPI_ENVIRONMENT}
FAPI_FRONT_URL: ${FAPI_FRONT_URL}
FAPI_BACK_URL: ${FAPI_BACK_URL}
How can I do this? I think this is related to where are saved the environment variables that I set in the CLI (cf screenshot). Thanks a lot.
No description
4 Replies
David
DavidOP•6mo ago
No one ? 😢
Gabe Vigodi
Gabe Vigodi•6mo ago
Here's the folder structure @David I haven't tried loading the env like this but it should work
No description
David
DavidOP•6mo ago
Amazing, thanks a lot. This way, this works
env_file:
- .env
env_file:
- .env
May I ask where can you find this arborescence? I tried to search on my host VPS, and on the Dokploy container but did not found.
Gabe Vigodi
Gabe Vigodi•6mo ago
The path is /etc/dokploy. You'll need the root user to make file updates

Did you find this page helpful?