first commit

This commit is contained in:
Mateusz Gruszczyński
2026-04-05 13:40:27 +02:00
commit 9a6e77a5fc
89 changed files with 18276 additions and 0 deletions

69
docker-compose.yml Normal file
View File

@@ -0,0 +1,69 @@
services:
postgres:
image: postgres:17-alpine
env_file:
- ./.env
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
api:
build:
context: ./api
env_file:
- ./.env
depends_on:
postgres:
condition: service_healthy
volumes:
- uploads_data:/app/uploads
expose:
- "4000"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:4000/api/health >/dev/null 2>&1 || exit 1"]
interval: 15s
timeout: 5s
retries: 10
start_period: 20s
restart: unless-stopped
web:
build:
context: ./web
depends_on:
api:
condition: service_healthy
expose:
- "80"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null 2>&1 || exit 1"]
interval: 15s
timeout: 5s
retries: 10
start_period: 10s
restart: unless-stopped
reverse-proxy:
image: nginx:1.29-alpine
env_file:
- ./.env
depends_on:
web:
condition: service_healthy
api:
condition: service_healthy
ports:
- "${PUBLIC_HTTP_PORT:-8080}:80"
volumes:
- ./reverse-proxy/nginx.conf.template:/etc/nginx/templates/default.conf.template:ro
- uploads_data:/srv/uploads:ro
restart: unless-stopped
volumes:
postgres_data:
uploads_data: