Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add files via upload #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions docker-compose-old.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# version is now using "compose spec"
# v2 and v3 are now combined!
# docker-compose v1.27+ required

services:
vote:
build: ./vote
# use python rather than gunicorn for local dev
command: wait-for-it --strict --timeout=60 redis:6379 -- python app.py
environment:
REDIS_HOST: "redis"
depends_on:
redis:
condition: service_healthy
volumes:
- ./vote:/app
ports:
- "5002:80"
networks:
- front-tier
- back-tier

result:
build: ./result
# use nodemon rather than node for local dev
command: nodemon server.js
environment:
PORT: "80"
PGUSER: "postgres"
PGHOST: "db"
PGPASSWORD: "postgres"
PGDATABASE: "postgres"
volumes:
- ./result:/app
ports:
- "5001:80"
- "5858:5858"
networks:
- front-tier
- back-tier

worker:
build:
context: ./worker
environment:
PGHOST: "db"
PGUSER: "postgres"
PGPASSWORD: "postgres"
REDIS_HOST: "redis"
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
networks:
- back-tier

redis:
image: redis:5.0-alpine3.10
volumes:
- "./healthchecks:/healthchecks"
healthcheck:
test: /healthchecks/redis.sh
interval: "5s"
ports: ["6379"]
networks:
- back-tier

db:
image: postgres:9.4
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
volumes:
- "db-data:/var/lib/postgresql/data"
- "./healthchecks:/healthchecks"
healthcheck:
test: /healthchecks/postgres.sh
interval: "5s"
networks:
- back-tier

loadbalancer:
build:
context: ./loadbalancer
environment:
PORT: 8080
VOTE_HOST: "vote"
VOTE_PORT: "80"
RESULT_HOST: "result"
RESULT_PORT: "80"
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
ports:
- "5000:8080"
networks:
- front-tier

volumes:
db-data:

networks:
front-tier:
back-tier:
Loading
Loading