This commit is contained in:
+17
-2
@@ -13,17 +13,32 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
command: redis-server --appendonly yes
|
||||
volumes:
|
||||
- redisdata:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
api:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/messenger
|
||||
- SESSION_TTL_SECONDS=3600
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- SESSION_TTL_SECONDS=2
|
||||
- INSTANCE_ID=api-node-1
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
pgdata:
|
||||
redisdata:
|
||||
Reference in New Issue
Block a user