Initial commit

This commit is contained in:
arrelin
2025-12-09 13:23:14 +03:00
commit 9f86d8eeec
26 changed files with 4787 additions and 0 deletions

45
docker-compose.yml Normal file
View File

@@ -0,0 +1,45 @@
version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: family_budget_db
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app_network
app:
build:
context: .
dockerfile: Dockerfile
container_name: family_budget_app
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
RUST_LOG: ${RUST_LOG:-info}
ports:
- "${APP_PORT:-8080}:8080"
depends_on:
postgres:
condition: service_healthy
networks:
- app_network
volumes:
postgres_data:
driver: local
networks:
app_network:
driver: bridge