feat(global): initialize project and framework structure, dockerize

This commit is contained in:
h
2025-09-02 00:03:50 +03:00
parent 3194237f5f
commit 2e9bfc888f
26 changed files with 422 additions and 113 deletions

52
docker-compose.yml Normal file
View File

@@ -0,0 +1,52 @@
services:
postgres:
image: postgres:latest
environment:
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
PGDATA: "/var/lib/postgresql/data/pgdata"
volumes:
- database:/var/lib/postgresql/data
profiles:
- ${DATABASE_PROFILE}
ports:
- ${DATABASE_OPEN_PORT}:5432
restart: unless-stopped
networks:
database:
aliases:
- "postgres"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DATABASE_USER}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
app:
build:
context: .
dockerfile: Dockerfile
image: the-system/base
env_file:
- ".env"
networks:
database:
profiles:
- ${APPLICATION_PROFILE}
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
database:
networks:
database: