first commit
This commit is contained in:
69
docker-compose.yml
Normal file
69
docker-compose.yml
Normal 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:
|
||||
Reference in New Issue
Block a user