Created
January 6, 2016 15:20
-
-
Save chartjes/9d215cbe6319965d7a97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is my scenario: | |
* using docker-compose to spin up 4 containers: master, read-only, db1, db2 | |
* all four containers are succesfully spun up | |
* once all the containers are up and running, I need to run the same two commands on master and read-only, one after the other | |
I have no idea how I can automate this and I prefer to NOT have folks manually do 'docker run blah blah blah' | |
Here is my current Docker compose file | |
db1: | |
image: postgres | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
db2: | |
image: postgres | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
master: | |
image: chartjes/kinto-master | |
links: | |
- db1 | |
ports: | |
- "8888:8888" | |
environment: | |
KINTO_CACHE_BACKEND: cliquet.cache.postgresql | |
KINTO_CACHE_URL: postgres://postgres:postgres@db1/postgres | |
KINTO_STORAGE_BACKEND: cliquet.storage.postgresql | |
KINTO_STORAGE_URL: postgres://postgres:postgres@db1/postgres | |
KINTO_PERMISSION_BACKEND: cliquet.permission.postgresql | |
KINTO_PERMISSION_URL: postgres://postgres:postgres@db1/postgres | |
read-only: | |
image: chartjes/kinto-read-only | |
links: | |
- db2 | |
ports: | |
- "8889:8889" | |
environment: | |
KINTO_CACHE_BACKEND: cliquet.cache.postgresql | |
KINTO_CACHE_URL: postgres://postgres:postgres@db2/postgres | |
KINTO_STORAGE_BACKEND: cliquet.storage.postgresql | |
KINTO_STORAGE_URL: postgres://postgres:postgres@db2/postgres | |
KINTO_PERMISSION_BACKEND: cliquet.permission.postgresql | |
KINTO_PERMISSION_URL: postgres://postgres:postgres@db2/postgres | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment