lab2 complete

This commit is contained in:
kuruoni
2026-11-14 04:50:02 +03:00
parent 65003b6119
commit 684d00c899
20 changed files with 796 additions and 16 deletions
+32
View File
@@ -0,0 +1,32 @@
services:
postgres:
image: postgres:16-alpine
container_name: messenger-postgres
environment:
POSTGRES_USER: messenger
POSTGRES_PASSWORD: secret_password
POSTGRES_DB: messenger_db
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U messenger -d messenger_db"]
interval: 3s
timeout: 3s
retries: 5
api:
build: .
container_name: messenger-api
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql://messenger:secret_password@postgres:5432/messenger_db
SESSION_TTL_SECONDS: 3600
ports:
- "8080:8080"
volumes:
postgres_data: