feat: add database and orm

This commit is contained in:
2026-10-21 10:14:50 +03:00
parent d8fb486709
commit ef2bc6f8b6
30 changed files with 668 additions and 354 deletions
+27
View File
@@ -0,0 +1,27 @@
name: messenger-lab2-test
services:
postgres:
image: postgres:17.2-alpine
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: messenger_test
tmpfs:
- /var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "test", "-d", "messenger_test"]
interval: 2s
timeout: 3s
retries: 15
tests:
build:
context: .
target: test
image: mtusi-messenger-lab2-test:dev
environment:
DATABASE_URL: postgresql://test:test@postgres:5432/messenger_test?connection_limit=20
depends_on:
postgres:
condition: service_healthy