version: "3" services: vote: image: victest/vote container_name: vote command: python app.py ports: - "5000:80" redis: image: redis:alpine container_name: redis ports: ["6379"] worker: container_name: worker image: victest/vote-worker depends_on: - redis - db # Postgres container will create an anonymous volume. VIC will use a # vmdk for the volume. Since it is a new volume, it will have a lost+found # folder, and the Postgres init scripts do not like a non-empty folder (the # lost+found folder). We work around this by directing the init scripts to # use another arbitrary folder. We do this by setting the PGDATA env var. db: container_name: db image: postgres:9.4 environment: - PGDATA=/var/lib/postgresql/data/data - POSTGRES_PASSWORD=password result: image: victest/vote-result container_name: result command: nodemon --debug server.js ports: - "5001:80" - "5858:5858"