feat: migrate backend to Golang (Gin + GORM)

This commit is contained in:
2026-10-30 01:55:46 +03:00
parent 65003b6119
commit 94907ee68d
20 changed files with 952 additions and 117 deletions
+32
View File
@@ -0,0 +1,32 @@
services:
api:
build: .
ports:
- "8080:8080"
environment:
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/messenger
- SESSION_TTL_SECONDS=3600
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/live"]
interval: 10s
timeout: 5s
retries: 5
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_DB=messenger
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- postgres_data:/var/lib/postgresql/data
- ./migrations/001_initial.sql:/docker-entrypoint-initdb.d/001_initial.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 5
volumes:
postgres_data: