Support multiple deployments on the same host #360
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR attempts to update
simoc.py
and related files in order to add support for multiple deployments on the same host.Docker already automatically prepends the name of the cwd to the containers/networks/etc names, so if e.g. the cwd is
simoc
and the network is calledsimoc-net
, the actual name will besimoc_simoc-net
. Since several such names were hardcoded in a number of places, I now dynamically prepend the name of the cwd.The PR also adds a new
--env-file
option tosimoc.py
that allows the user to specify a different env file. For testing purposes, I also included asimoc2_docker.env
file (a copy ofsimoc_docker.env
with different ports), that can be used by running:Even though most containers seem to work, I'm still having some trouble with the mysql and redis containers. The former fails with:
The address it's trying to connect to is:
3307
is the port specified insimoc2_docker.env
.By running
docker logs -f simoc2_celery-worker_1
, I also noticed the following error: