split docker compose file

This commit is contained in:
2025-03-27 13:34:17 +01:00
parent 6ec45fc9db
commit d94c558989
11 changed files with 143 additions and 105 deletions

View File

@@ -0,0 +1,43 @@
services:
redis:
image: redis/redis-stack:7.4.0-v3
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
volumes:
- redis_data:/data
- redisinsight_data:/redisinsight
flyway:
image: flyway/flyway
command: migrate
depends_on:
postgresql:
condition: service_healthy
volumes:
- ../../migrations/events:/flyway/sql
- ../flyway.conf:/flyway/conf/flyway.conf
restart: no
postgresql:
image: postgres:17.4
environment:
POSTGRES_PASSWORD_FILE: /run/secrets/postgresql_password
POSTGRES_USER: event-demo
secrets:
- postgresql_password
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U event-demo'"]
interval: 1s
timeout: 5s
retries: 10
volumes:
- postgresql_data:/var/lib/postgresql/data
secrets:
postgresql_password:
file: ../postgresql.secret
volumes:
redis_data:
redisinsight_data:
postgresql_data: