58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
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
|
|
command: postgres -c 'max_connections=500'
|
|
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
|
|
|
|
rabbitmq:
|
|
image: rabbitmq:4-management-alpine
|
|
environment:
|
|
RABBITMQ_DEFAULT_USER: event-demo
|
|
RABBITMQ_DEFAULT_PASS: changeit
|
|
healthcheck:
|
|
test: [ "CMD", "nc", "-z", "localhost", "5672" ]
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 5
|
|
volumes:
|
|
- rabbitmq_data:/var/lib/rabbitmq/
|
|
|
|
secrets:
|
|
postgresql_password:
|
|
file: ../postgresql.secret
|
|
|
|
volumes:
|
|
redis_data:
|
|
redisinsight_data:
|
|
postgresql_data:
|
|
rabbitmq_data: |