Completed for a grade of three

This commit is contained in:
2026-10-08 20:26:09 +03:00
parent 16fa679bc0
commit b38a33308d
100 changed files with 2832 additions and 602 deletions
+44 -4
View File
@@ -1,11 +1,51 @@
name: mtusi-messenger-lab2
services:
messenger:
postgres:
image: postgres:17.6-alpine3.22
container_name: mtusi-lab2-postgres
environment:
POSTGRES_DB: messenger
POSTGRES_USER: messenger
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_password
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U messenger -d messenger"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
restart: unless-stopped
api:
build: .
image: mtusi-messenger:lab2
container_name: mtusi-messenger-lab2
ports:
- "127.0.0.1:8080:8080"
container_name: mtusi-lab2-api
depends_on:
postgres:
condition: service_healthy
environment:
APP_HOST: "0.0.0.0"
APP_PORT: "8080"
DB_HOST: postgres
DB_PORT: "5432"
DB_NAME: messenger
DB_USER: messenger
DB_PASSWORD_FILE: /run/secrets/db_password
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
secrets:
- db_password
ports:
- "127.0.0.1:8080:8080"
restart: unless-stopped
secrets:
db_password:
file: ./secrets/db_password
volumes:
postgres-data: