Skip to content

Instantly share code, notes, and snippets.

@eeganlf
Forked from initcron/docker-compose.yaml
Last active August 8, 2024 05:05
Show Gist options
  • Select an option

  • Save eeganlf/6ef237a05808fb1344bd43414b844844 to your computer and use it in GitHub Desktop.

Select an option

Save eeganlf/6ef237a05808fb1344bd43414b844844 to your computer and use it in GitHub Desktop.
Docker Compose Spec with Dockerfile Build Integration.
volumes:
db-data:
networks:
instavote:
driver: bridge
services:
vote:
image: xxxxx/vote:latest
build: ./vote
ports:
- 5000:80
depends_on:
- redis
networks:
- instavote
redis:
image: redis:alpine
networks:
- instavote
db:
image: postgres:15-alpine
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
volumes:
- "db-data:/var/lib/postgresql/data"
- "./healthchecks:/healthchecks"
healthcheck:
test: /healthchecks/postgres.sh
interval: "5s"
networks:
- instavote
result:
image: xxxxx/result:latest
build: ./result
ports:
- 5001:80
depends_on:
- db
networks:
- instavote
worker:
image: xxxxx/worker:latest
build: ./worker
depends_on:
- redis
- db
networks:
- instavote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment