BuyingAgent/docker-compose.dev-env.yml
Lars c9c0ff96fc
Some checks failed
Deploy Development / deploy (push) Successful in 24s
Test Suite / pytest-backend (push) Failing after 14s
Test Suite / smoke-dev (push) Successful in 0s
Ergaenze die Kansho-analoge Test-Suite gegen buyingagent_test.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 11:20:30 +02:00

82 lines
2.1 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: .
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}"
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
api-test:
profiles: ["test"]
build:
context: .
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
depends_on:
postgres:
condition: service_healthy
networks:
- dev-buyingagent-network
volumes:
dev-buyingagent-db-data:
networks:
dev-buyingagent-network:
driver: bridge