jobhunt-platform/docker-compose.yml
jocke 7ede416a3b
All checks were successful
CI / api-tests (push) Successful in 34s
CI / package-tests (push) Successful in 26s
CI / web-tests (push) Successful in 23s
Drop host port publish for postgres (5433 taken by bilhej-postgres-prod on host)
2026-07-31 10:15:18 +00:00

70 lines
No EOL
1.7 KiB
YAML

# POC infrastructure for jobhunt-platform.
# Only the postgres service is defined here; app services are run locally for now.
services:
postgres:
image: postgres:16
container_name: jobhunt-postgres
environment:
POSTGRES_USER: jobhunt
POSTGRES_PASSWORD: jobhunt
POSTGRES_DB: jobhunt
# No host port publishing: CI/tests run inside the compose network, and on
# this host 5433 is already taken by bilhej-postgres-prod.
volumes:
- jobhunt_pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U jobhunt -d jobhunt"]
interval: 5s
timeout: 3s
retries: 10
api-test:
build:
context: .
dockerfile: apps/api/Dockerfile.test
environment:
DATABASE_URL: postgresql://jobhunt:jobhunt@postgres:5432/jobhunt
depends_on:
postgres:
condition: service_healthy
restart: "no"
api:
build:
context: .
dockerfile: apps/api/Dockerfile.test
image: jobhunt-platform-api-test
entrypoint: uvicorn app.main:app --host 0.0.0.0 --port 8000
environment:
DATABASE_URL: postgresql://jobhunt:jobhunt@postgres:5432/jobhunt
working_dir: /app/apps/api
depends_on:
postgres:
condition: service_healthy
restart: "no"
web:
build:
context: .
dockerfile: apps/web/Dockerfile
args:
VITE_API_BASE: http://api:8000/api
depends_on:
- api
restart: "no"
shots:
build:
context: .
dockerfile: scripts/Dockerfile.shots
volumes:
- shots_out:/out
depends_on:
- api
- web
restart: "no"
volumes:
jobhunt_pgdata:
name: jobhunt_pgdata
shots_out: