57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
# Production stack for jobhunt-platform.
|
|
# Built and started by .forgejo/workflows/deploy.yml on the host docker daemon.
|
|
# Web UI is published on http://<host>:8085, API on :8000. Postgres is internal only.
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
container_name: jobhunt-postgres
|
|
environment:
|
|
POSTGRES_USER: jobhunt
|
|
POSTGRES_PASSWORD: jobhunt
|
|
POSTGRES_DB: jobhunt
|
|
volumes:
|
|
- jobhunt_pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U jobhunt -d jobhunt"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/api/Dockerfile.test
|
|
image: jobhunt-api
|
|
container_name: jobhunt-api
|
|
entrypoint: uvicorn app.main:app --host 0.0.0.0 --port 8000
|
|
env_file: .env
|
|
environment:
|
|
DATABASE_URL: postgresql://jobhunt:jobhunt@postgres:5432/jobhunt
|
|
working_dir: /app/apps/api
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/web/Dockerfile
|
|
args:
|
|
# Baked into the SPA at build time. Relative /api goes through the
|
|
# nginx proxy in apps/web/nginx.conf -> http://api:8000/api/
|
|
VITE_API_BASE: /api
|
|
image: jobhunt-web
|
|
container_name: jobhunt-web
|
|
ports:
|
|
- "8085:80"
|
|
depends_on:
|
|
- api
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
jobhunt_pgdata:
|
|
name: jobhunt_pgdata
|