cloudnet-compose/docker-compose.yml
Bret Fisher 41f2764b94 fix worker depends_on
There was inconsistency in the worker compose yaml for depends_on. The worker requires both db and redis, and in the default docker-compose.yml it was missing db, causing worker to crash on `docker-compose up`. In two other compose files for stacks, where depends_on was used for other services, I added it for the worker to match.
2019-08-25 16:50:48 -04:00

56 lines
821 B
YAML

version: "3"
services:
vote:
build: ./vote
command: python app.py
volumes:
- ./vote:/app
ports:
- "5000:80"
networks:
- front-tier
- back-tier
result:
build: ./result
command: nodemon server.js
volumes:
- ./result:/app
ports:
- "5001:80"
- "5858:5858"
networks:
- front-tier
- back-tier
worker:
build:
context: ./worker
depends_on:
- "redis"
- "db"
networks:
- back-tier
redis:
image: redis:alpine
container_name: redis
ports: ["6379"]
networks:
- back-tier
db:
image: postgres:9.4
container_name: db
volumes:
- "db-data:/var/lib/postgresql/data"
networks:
- back-tier
volumes:
db-data:
networks:
front-tier:
back-tier: