Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use .env and init container #18

Merged
merged 2 commits into from
Dec 3, 2024
Merged

use .env and init container #18

merged 2 commits into from
Dec 3, 2024

Conversation

gilesknap
Copy link
Member

@gilesknap gilesknap commented Dec 3, 2024

tidy up the configurable version of example-services by using a .env file and init container.

With the addition of a default value for UIDGID we now have the project fully described in compose yaml. The environment.sh script is a convenience but at DLS you can launch the project without that file using these commands:

module load docker-compose
docker compose --profile test up -d

This achieves my goal of making this a "pure" docker compose implementation.

@gilesknap
Copy link
Member Author

gilesknap commented Dec 3, 2024

YES.

One side affect of this is that compose is clever enough for this:-

dc up -d
# edit .env and change some of the EPICS ports
dc up -d 
# compose restarts ONLY the services that need it and everything comes to life with the new ports

e.g. if I change PVA server port the ca-gateway is left alone. This paves the way for tuning the behaviour by limiting which environment variables are passed to each container (e.g. we could keep the CA port inside the container network always the same)

@gilesknap gilesknap merged commit ce246f1 into configurable-net Dec 3, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant