mirror of
https://github.com/dockersamples/example-voting-app.git
synced 2026-07-11 01:19:17 +00:00
compose and K8s file cleanup (#273)
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user