Disable automatic execution of setup
service via Compose profile
#798
Labels
discuss
General discussion threads, suggestions for improvements, etc.
feature request
Requests for new features, such as additional configurations or extensions
A thread to discuss whether or not it would make sense to guard the execution of the
setup
script using a Compose profile.Context
This mechanism allows excluding selected services from regular executions of
docker-compose up
, unless those services are explicily listed on the command line. It is particularly useful for one-offs (init scripts, ...), automated tests, etc.We already leverage profiles on the
tls
branch for generating TLS certificates and private keys usingdocker-compose up tls
:docker-elk/docker-compose.yml
Lines 14 to 16 in 1370c34
Proposal
I've been thinking about using the same mechanism for the
setup
script.Right now,
setup
runs on every execution ofdocker-compose up
(and exits when done). This is fine because, upon successful execution, the script creates a lock file to prevent subsequent runs and avoid overriding existing roles and users on every startup.However, creating this container every time isn't essential, and we could as well document the fact that people need to run
docker-compose up setup
the first time they spin up their stack.The text was updated successfully, but these errors were encountered: