Initial setup work for system tests
This commit is contained in:
69
tests/WebApi.Tests.System/compose.system.yaml
Normal file
69
tests/WebApi.Tests.System/compose.system.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
services:
|
||||
app:
|
||||
build: ../../src/WebApi
|
||||
environment:
|
||||
Vegasco_ConnectionStrings__Default: "Host=db;Port=5432;Database=postgres;Username=postgres;Password=postgres"
|
||||
Vegasco_JWT__Issuer:
|
||||
Vegasco_JWT__Authority:
|
||||
Vegasco_JWT__Audience:
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
login:
|
||||
condition: service_healthy
|
||||
|
||||
db:
|
||||
image: postgres:16.3-alpine
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
healthcheck:
|
||||
test: pg_isready -d postgres
|
||||
interval: 5s
|
||||
timeout: 2s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
|
||||
login:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.keycloak
|
||||
command: start --import-realm
|
||||
environment:
|
||||
KC_DB: postgres
|
||||
KC_DB_URL_HOST: login-db
|
||||
KC_DB_URL_PORT: 5432
|
||||
KC_DB_URL_DATABASE: keycloak
|
||||
KC_DB_USERNAME: keycloak
|
||||
KC_DB_PASSWORD: keycloak
|
||||
KEYCLOAK_ADMIN: admin
|
||||
KEYCLOAK_ADMIN_PASSWORD: admin1!
|
||||
KC_HOSTNAME: http://localhost:12345/
|
||||
KC_HEALTH_ENABLED: true
|
||||
KC_METRICS_ENABLED: true
|
||||
KC_HTTP_ENABLED: true
|
||||
ports:
|
||||
- 12345:8080
|
||||
volumes:
|
||||
- ./test-realm.json:/opt/keycloak/data/import/realm.json:ro
|
||||
depends_on:
|
||||
login-db:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: curl --head -fsS http://localhost:9000/health/ready || exit 1
|
||||
interval: 5s
|
||||
timeout: 2s
|
||||
retries: 6
|
||||
start_period: 5s
|
||||
|
||||
login-db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: keycloak
|
||||
POSTGRES_PASSWORD: keycloak
|
||||
healthcheck:
|
||||
test: pg_isready -d keycloak
|
||||
interval: 5s
|
||||
timeout: 2s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
Reference in New Issue
Block a user