compose and K8s file cleanup (#273)

This commit is contained in:
Bret Fisher
2022-12-16 21:50:40 -05:00
committed by GitHub
parent f0fb81f707
commit 226edf0184
13 changed files with 139 additions and 509 deletions

View File

@@ -9,7 +9,13 @@ services:
command: python app.py
depends_on:
redis:
condition: service_healthy
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
volumes:
- ./vote:/app
ports:
@@ -46,7 +52,7 @@ services:
- back-tier
redis:
image: redis:5.0-alpine3.10
image: redis:alpine
volumes:
- "./healthchecks:/healthchecks"
healthcheck:
@@ -57,7 +63,7 @@ services:
- back-tier
db:
image: postgres:9.4
image: postgres:15-alpine
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
@@ -70,6 +76,19 @@ services:
networks:
- back-tier
# this service runs once to seed the database with votes
# it won't run unless you specify the "seed" profile
# docker compose --profile seed up -d
seed:
build: ./seed-data
profiles: ["seed"]
depends_on:
vote:
condition: service_healthy
networks:
- front-tier
restart: "no"
volumes:
db-data: