перенос файлов рабочей версии lab2

This commit is contained in:
2026-11-13 19:35:08 +03:00
parent 0ab3a341aa
commit f880e234db
10 changed files with 885 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
services:
api:
build: .
ports:
- "8080:8080"
environment:
- DATABASE_URL=postgresql://messenger:messenger_pass@postgres:5432/messenger
- SESSION_TTL_SECONDS=3600
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
postgres:
image: postgres:16.1
environment:
- POSTGRES_DB=messenger
- POSTGRES_USER=messenger
- POSTGRES_PASSWORD=messenger_pass
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U messenger"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
volumes:
postgres_data: