Skip to content

Instantly share code, notes, and snippets.

@initcron
Created December 31, 2020 10:51
Show Gist options
  • Select an option

  • Save initcron/af876f43366353378e917bcf8a6fc0bf to your computer and use it in GitHub Desktop.

Select an option

Save initcron/af876f43366353378e917bcf8a6fc0bf to your computer and use it in GitHub Desktop.
Docker Compose Spec with Dockerfile Build Integration.
version: "3.8"
volumes:
db-data:
networks:
instavote:
driver: bridge
services:
vote:
image: initcron/vote:latest
build: ./vote
ports:
- 5000:80
depends_on:
- redis
networks:
- instavote
redis:
image: redis:alpine
networks:
- instavote
db:
image: postgres:9.4
volumes:
- "db-data:/var/lib/postgresql/data"
networks:
- instavote
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
result:
image: initcron/result:latest
build: ./vote
ports:
- 5001:4000
depends_on:
- db
networks:
- instavote
worker:
image: initcron/worker:latest
build: ./vote
depends_on:
- redis
- db
networks:
- instavote
@prantikb
Copy link

prantikb commented May 8, 2021

Could you please take a look at the build for the result and worker services? The directory may need to be updated to the corresponding directories.

@mtilson
Copy link

mtilson commented Jun 2, 2021

L37: build: ./vote -> build: ./result
L47: build: ./vote -> build: ./worker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment