70 lines
No EOL
1.7 KiB
YAML
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: |