Сделана лаба 2
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-11-16 21:11:01 +03:00
parent 65003b6119
commit 76851cc2f5
8 changed files with 666 additions and 24 deletions
+36
View File
@@ -0,0 +1,36 @@
services:
postgres:
image: postgres:16.4
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\""]
interval: 3s
timeout: 3s
retries: 20
api:
build: .
environment:
APP_HOST: ${APP_HOST:-0.0.0.0}
APP_PORT: ${APP_PORT:-8080}
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
depends_on:
postgres:
condition: service_healthy
ports:
- "127.0.0.1:8080:8080"
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health/ready')"]
interval: 5s
timeout: 3s
retries: 20
volumes:
postgres-data: