This commit is contained in:
caramelteawithmint
2026-11-06 03:13:43 +03:00
parent 65003b6119
commit fc62d81ec4
12 changed files with 503 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: messenger
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d messenger"]
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
- INSTANCE_ID=api-node-1
depends_on:
db:
condition: service_healthy
volumes:
pgdata: