2026-09-20 09:13:48 +02:00
|
|
|
services:
|
|
|
|
|
db:
|
|
|
|
|
image: postgres:18-alpine
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_DB: go_guess
|
|
|
|
|
POSTGRES_USER: go_guess
|
|
|
|
|
POSTGRES_PASSWORD: go_guess
|
2026-10-02 23:41:40 +02:00
|
|
|
volumes:
|
|
|
|
|
- ./bdd/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
2026-09-20 09:13:48 +02:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U go_guess -d go_guess"]
|
|
|
|
|
interval: 2s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 30
|
|
|
|
|
|
|
|
|
|
rabbitmq:
|
|
|
|
|
image: rabbitmq:4-alpine
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
|
|
|
|
|
interval: 3s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 30
|
|
|
|
|
|
|
|
|
|
app:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile
|
2026-10-02 23:41:40 +02:00
|
|
|
args:
|
|
|
|
|
VITE_GO_LOOSE_API_KEY: gl_bdd_key_that_is_long_enough_for_client
|
2026-09-20 09:13:48 +02:00
|
|
|
environment:
|
2026-10-02 23:41:40 +02:00
|
|
|
DATABASE_URL: postgres://go_guess:go_guess@db:5432/go_guess?sslmode=disable&search_path=ypto
|
2026-09-20 09:13:48 +02:00
|
|
|
JWT_SECRET: bdd-test-secret-that-is-at-least-32-characters
|
2026-10-02 23:41:40 +02:00
|
|
|
FRONTEND_URL: http://ypto.guess.local:8080
|
|
|
|
|
GO_LOOSE_BASE_URL: http://127.0.0.1:18081
|
2026-09-20 09:13:48 +02:00
|
|
|
RABBITMQ_URL: amqp://guest:guest@rabbitmq:5672/
|
|
|
|
|
APP_ENV: test
|
|
|
|
|
ports:
|
|
|
|
|
- "${BDD_WEB_PORT:-15174}:8080"
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
rabbitmq:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8080/api/health"]
|
|
|
|
|
interval: 3s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 30
|
|
|
|
|
|
|
|
|
|
bdd:
|
|
|
|
|
build:
|
|
|
|
|
context: bdd
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
environment:
|
2026-10-02 23:41:40 +02:00
|
|
|
BDD_BASE_URL: http://ypto.guess.local:8080
|
2026-09-20 09:13:48 +02:00
|
|
|
BDD_HEADLESS: "true"
|
|
|
|
|
BDD_STEP_TIMEOUT_MS: "15000"
|
|
|
|
|
network_mode: service:app
|
|
|
|
|
volumes:
|
|
|
|
|
- ./bdd/reports:/work/reports
|
|
|
|
|
depends_on:
|
|
|
|
|
app:
|
|
|
|
|
condition: service_healthy
|