Changeset View
Standalone View
docker-compose.yml
version: '2' | version: '2' | ||||
services: | services: | ||||
amqp: | |||||
image: rabbitmq:3.6-management | |||||
ports: | |||||
- 5018:15672 | |||||
swh-scheduler-db: | |||||
image: postgres:10 | |||||
environment: | |||||
POSTGRES_PASSWORD: testpassword | |||||
POSTGRES_DB: swh-scheduler | |||||
swh-scheduler-api: | |||||
image: swh/scheduler-api | |||||
build: ./dockerfiles/swh-scheduler-api | |||||
ardumont: can't we move that in dockerfiles/swh-scheduler/scheduler.env?
keeping the configuration file… | |||||
Done Inline Actions
we could be this env file is not part of the docker image building process, it's really part of the compose orchestration one. So it's not about 'put all config files in one location' actually. At some point we may need/want to split the docker image generation away from the compose (orchestration) part. douardda: > can't we move that in dockerfiles/swh-scheduler/scheduler.env?
we could be this env file is… | |||||
env_file: ./scheduler.env | |||||
depends_on: | |||||
- swh-scheduler-db | |||||
ports: | |||||
- 5008:5008 | |||||
swh-scheduler-listener: | |||||
image: swh/scheduler-worker | |||||
build: ./dockerfiles/swh-scheduler-worker | |||||
env_file: ./scheduler.env | |||||
command: listener | |||||
depends_on: | |||||
- swh-scheduler-api | |||||
- amqp | |||||
swh-scheduler-runner: | |||||
image: swh/scheduler-worker | |||||
env_file: ./scheduler.env | |||||
command: runner | |||||
depends_on: | |||||
Not Done Inline ActionsWhat do you mean? I thought the runner and listener were unrelated, checking. ardumont: What do you mean?
I thought the runner and listener were unrelated, checking. | |||||
Not Done Inline ActionsThey are independent, but if we run stuff. Is that why you drew the deps here? ardumont: They are independent, but if we run stuff.
We would also want that the workers consuming stuff… | |||||
Done Inline Actions
it's really is just a simple technical deps due to the fact both services share the same image and the fact we do use docker-compose to build them. douardda: > Is that why you drew the deps here?
it's really is just a simple technical deps due to the… | |||||
Done Inline Actions
yes they are. The dependency is there just so the swh/scheduler-worker image is built when starting the runner. Which is a reason why I said in my previous comment:
douardda: > What do you mean?
> I thought the runner and listener were unrelated, checking.
yes they are. | |||||
Not Done Inline ActionsWhat if we just repeat build: ./dockerfiles/swh-scheduler-worker in this service declaration? vlorentz: What if we just repeat `build: ./dockerfiles/swh-scheduler-worker` in this service declaration? | |||||
- swh-scheduler-listener # for the image only | |||||
- swh-scheduler-api | |||||
- amqp | |||||
swh-storage-db: | swh-storage-db: | ||||
image: postgres:10 | image: postgres:10 | ||||
environment: | environment: | ||||
POSTGRES_PASSWORD: testpassword | POSTGRES_PASSWORD: testpassword | ||||
POSTGRES_DB: swh-storage | POSTGRES_DB: swh-storage | ||||
swh-storage: | swh-storage: | ||||
build: ./dockerfiles/swh-storage | build: ./dockerfiles/swh-storage | ||||
image: swh/storage | image: swh/storage | ||||
ports: | ports: | ||||
- 5002:5002 | - 5002:5002 | ||||
depends_on: | depends_on: | ||||
- swh-storage-db | - swh-storage-db | ||||
- swh-objstorage | - swh-objstorage | ||||
environment: | environment: | ||||
POSTGRES_PASSWORD: testpassword | POSTGRES_PASSWORD: testpassword | ||||
POSTGRES_DB: swh-storage | POSTGRES_DB: swh-storage | ||||
PGHOST: swh-storage-db | PGHOST: swh-storage-db | ||||
PGUSER: postgres | PGUSER: postgres | ||||
swh-objstorage: | swh-objstorage: | ||||
build: ./dockerfiles/swh-objstorage | build: ./dockerfiles/swh-objstorage | ||||
image: swh/objstorage | image: swh/objstorage | ||||
ports: | ports: | ||||
- 5003:5003 | - 5003:5003 | ||||
swh-web: | swh-web: | ||||
build: ./dockerfiles/swh-web | build: ./dockerfiles/swh-web | ||||
image: swh/web | image: swh/web | ||||
ports: | ports: | ||||
- 5004:5004 | - 5004:5004 | ||||
depends_on: | depends_on: | ||||
- swh-objstorage | - swh-objstorage | ||||
- swh-storage | - swh-storage |
can't we move that in dockerfiles/swh-scheduler/scheduler.env?
keeping the configuration file in one location.