Files
foxhunt/services/api/tests/docker-compose.yml
jgrusewski e50ea55064 feat: create services/api/ — unified gRPC gateway with tonic-web
Copied from api_gateway, removed REST handlers (port 8080),
added tonic-web + CORS for grpc-web browser access.
Binary renamed: api-gateway → api

Changes:
- Package name: api-gateway → api
- Deleted src/handlers/ (REST ML endpoints on port 8080)
- Added tonic-web 0.13 + tower-http CORS layer
- Server::builder().accept_http1(true) for grpc-web
- CORS_ORIGINS env var (default http://localhost:5173)
- Metrics server on port 9091 (axum) preserved
- All 95 lib tests pass, 0 clippy warnings
- Added services/api to workspace members

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:32:46 +01:00

37 lines
880 B
YAML

version: '3.8'
services:
# Redis for JWT revocation and rate limiting
redis:
image: redis:7-alpine
container_name: api_test_redis
ports:
- "6380:6379"
command: redis-server --save "" --appendonly no --maxmemory 256mb --maxmemory-policy allkeys-lru
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 5
# PostgreSQL for configuration (if needed)
postgres:
image: postgres:16-alpine
container_name: api_test_postgres
ports:
- "5433:5432"
environment:
POSTGRES_DB: foxhunt_test
POSTGRES_USER: foxhunt_test
POSTGRES_PASSWORD: test_password
POSTGRES_INITDB_ARGS: "-E UTF8"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U foxhunt_test"]
interval: 1s
timeout: 3s
retries: 5
networks:
default:
name: api_test_network