Files
satellite-provider/docker-compose.tests.yml
T
Oleksandr Bezdieniezhnykh 80ef5608f1 chore: WIP pre-implement cycle 14 baseline
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 16:13:37 +03:00

76 lines
2.6 KiB
YAML

# Integration test stack.
# Platform: native host arch — linux/arm64 on Apple Silicon Mac (M1+), linux/amd64
# on an amd64 Linux host. No platform: pin (Mac must not force linux/amd64 / Rosetta).
# CI: unit tests arm64-only (.woodpecker/01-test.yml); image builds arm64 + amd64
# (.woodpecker/02-build-push.yml matrix). See tests/environment.md § Platform.
services:
postgres:
image: postgres:16
container_name: satellite-provider-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: satelliteprovider
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
api:
build:
context: .
dockerfile: SatelliteProvider.Api/Dockerfile
container_name: satellite-provider-api
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:8080
- ASPNETCORE_Kestrel__Certificates__Default__Path=/app/certs/api.pfx
- ASPNETCORE_Kestrel__Certificates__Default__Password=satellite-dev-cert
- ConnectionStrings__DefaultConnection=Host=postgres;Port=5432;Database=satelliteprovider;Username=postgres;Password=postgres
- MapConfig__ApiKey=${GOOGLE_MAPS_API_KEY}
- JWT_SECRET=${JWT_SECRET}
- JWT_ISSUER=${JWT_ISSUER}
- JWT_AUDIENCE=${JWT_AUDIENCE}
volumes:
- ./tiles:/app/tiles
- ./ready:/app/ready
- ./logs:/app/logs
- ./certs/api.pfx:/app/certs/api.pfx:ro
depends_on:
postgres:
condition: service_healthy
integration-tests:
build:
context: .
dockerfile: SatelliteProvider.IntegrationTests/Dockerfile
container_name: satellite-provider-integration-tests
environment:
- API_URL=https://api:8080
- INTEGRATION_TESTS_MODE=${INTEGRATION_TESTS_MODE:-full}
- INTEGRATION_KEEP_STATE=${INTEGRATION_KEEP_STATE:-}
- ASPNETCORE_ENVIRONMENT=Testing
- DB_CONNECTION_STRING=Host=postgres;Port=5432;Database=satelliteprovider;Username=postgres;Password=postgres
- JWT_SECRET=${JWT_SECRET}
- JWT_ISSUER=${JWT_ISSUER}
- JWT_AUDIENCE=${JWT_AUDIENCE}
volumes:
- ./ready:/app/ready
- ./tiles:/app/tiles
- ./certs/api.crt:/usr/local/share/ca-certificates/satellite-provider-dev.crt:ro
entrypoint:
- /bin/sh
- -c
- update-ca-certificates >/dev/null 2>&1 && exec dotnet /app/SatelliteProvider.IntegrationTests.dll
depends_on:
api:
condition: service_started
postgres:
condition: service_healthy
restart: "no"
volumes:
postgres_data: