threefoldtech / grid_deployment

Deploy a full Grid backend with docker-compose and snapshots
Apache License 2.0
2 stars 0 forks source link

.env: separate unique deployment data from service versions #27

Closed coesensbert closed 7 months ago

coesensbert commented 8 months ago

the .env currently has specific deployment data and the service versions. This files is in .gitignore so it's not possible to just git pull newer versions without manual adjustments.

Test separate environment files to have the versions in one that is not in .gitignore

coesensbert commented 7 months ago

this!

The .env file in the project root, and the env_file: field in the Compose file are two different concepts.

The .env is for settings a default environment for Compose. Values set in this file can be used within the Compose file.

The env_file: field is for setting the default environment for a container. Values set in this can be used in the container, but not in the Compose file.

means versions go into .env and others in secrets.env and specified at each container that needs it

coesensbert commented 7 months ago

only way i found was to work with two env files in the startup cmd docker compose --env-file .secrets.env --env-file .env up -d

added changes to, already tested 02. Still have to do dev.grid.tf https://github.com/threefoldtech/grid_deployment/tree/development/docker-compose/devnet

coesensbert commented 7 months ago

env var precedence docs: https://docs.docker.com/compose/environment-variables/envvars-precedence/

coesensbert commented 7 months ago

Apply to all running devnet grid stacks:

coesensbert commented 7 months ago

all done, docs will follow

in short:

coesensbert commented 7 months ago

all changes for devnet also pushed to test and mainnet