BuyingAgent/docker-compose.dev-env.yml
Lars 46857715df
Some checks failed
Deploy Development / deploy (push) Successful in 1m49s
Test Suite / pytest-backend (push) Failing after 32s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-checks (push) Successful in 30s
Lerne Taxonomie und Trefferliste live von Geizhals, damit Wizard und Kandidaten echte Quelldaten nutzen.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-04 14:53:08 +02:00

102 lines
2.7 KiB
YAML

# Server development stack: ~/docker/buyingagent-dev
# No fixed container_name — Compose prefixes with the project name.
services:
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: "${DB_NAME:-buyingagent_dev}"
POSTGRES_USER: "${DB_USER:-buyingagent_dev}"
POSTGRES_PASSWORD: "${DB_PASSWORD:-dev_password_change_me}"
volumes:
- dev-buyingagent-db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-buyingagent_dev} -d ${DB_NAME:-buyingagent_dev}"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
networks:
- dev-buyingagent-network
api:
build:
context: ./backend
dockerfile: Dockerfile
target: runtime
environment:
DB_HOST: postgres
DB_PORT: "5432"
DB_NAME: "${DB_NAME:-buyingagent_dev}"
DB_USER: "${DB_USER:-buyingagent_dev}"
DB_PASSWORD: "${DB_PASSWORD:-dev_password_change_me}"
ENVIRONMENT: "${ENVIRONMENT:-development}"
ENGINE_BUILD: "${ENGINE_BUILD:-dev}"
CORS_ALLOWED_ORIGINS: "${CORS_ALLOWED_ORIGINS:-http://localhost:5173,http://127.0.0.1:5173,http://192.168.2.49:5174}"
GEIZHALS_USE_FIXTURES: "${GEIZHALS_USE_FIXTURES:-0}"
GEIZHALS_PLAYWRIGHT: "${GEIZHALS_PLAYWRIGHT:-1}"
ports:
- "${BUYING_AGENT_API_PORT:-8095}:8000"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health/ready')",
]
interval: 10s
timeout: 5s
retries: 18
start_period: 90s
restart: unless-stopped
networks:
- dev-buyingagent-network
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
environment:
API_PROXY_TARGET: http://api:8000
ports:
- "${BUYING_AGENT_FRONTEND_PORT:-5174}:80"
depends_on:
api:
condition: service_healthy
restart: unless-stopped
networks:
- dev-buyingagent-network
api-test:
profiles: ["test"]
build:
context: ./backend
dockerfile: Dockerfile
target: test
environment:
DB_HOST: postgres
DB_PORT: "5432"
DB_NAME: "${DB_NAME:-buyingagent_dev}"
DB_USER: "${DB_USER:-buyingagent_dev}"
DB_PASSWORD: "${DB_PASSWORD:-dev_password_change_me}"
ENVIRONMENT: test
ENGINE_BUILD: test
CLOCK_NOW: "2026-10-03T12:00:00Z"
GEIZHALS_USE_FIXTURES: "1"
depends_on:
postgres:
condition: service_healthy
networks:
- dev-buyingagent-network
volumes:
dev-buyingagent-db-data:
networks:
dev-buyingagent-network:
driver: bridge