fetch_ml/tests/e2e/docker-compose.logs-debug.yml
Jeremie Fraeys 1436e0ccc2
fix: update test setup with docker-compose for Redis
- Revert make test to include unit, integration, and e2e tests
- Start Redis via docker-compose before running tests (port 6379)
- Add docker-compose cleanup before and after test run
- Use tests/e2e/docker-compose.logs-debug.yml for test infrastructure
2026-02-18 15:56:21 -05:00

50 lines
1.1 KiB
YAML

---
# Docker Compose configuration for logs and debug E2E tests
# Simplified version using pre-built golang image with source mount
services:
redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
api-server:
image: golang:1.25-bookworm
working_dir: /app
command: >
sh -c "
go build -o api-server ./cmd/api-server/main.go &&
./api-server --config /app/configs/api/dev.yaml
"
ports:
- "9102:9101"
environment:
- LOG_LEVEL=debug
- REDIS_ADDR=redis:6379
- FETCHML_NATIVE_LIBS=0
volumes:
- ../../:/app
- api-logs:/logs
- api-experiments:/data/experiments
- api-active:/data/active
- go-mod-cache:/go/pkg/mod
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:9101/health"]
interval: 5s
timeout: 3s
retries: 10
start_period: 30s
volumes:
api-logs:
api-experiments:
api-active:
go-mod-cache: