forked from logto-io/logto
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.integration.yml
More file actions
58 lines (56 loc) · 1.68 KB
/
docker-compose.integration.yml
File metadata and controls
58 lines (56 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Docker Compose configuration for integration tests
services:
postgres:
image: postgres:17-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: p0stgr3s
POSTGRES_DB: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 3s
timeout: 3s
retries: 20
redis:
image: redis:6-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 3s
retries: 20
logto:
stop_signal: SIGINT
volumes:
# Mount the temporary directory for storing mock connector records, which will be used by
# the integration tests.
- ./.integration-test-tmp:/tmp/logto
- ./.integration-test-coverage:/coverage
extra_hosts:
# Add host.docker.internal for the container to access the host machine, which is required for
# mock web server to receive webhooks from Logto.
- "host.docker.internal:host-gateway"
build:
context: .
dockerfile: Dockerfile.integration
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
DB_URL: postgres://postgres:p0stgr3s@postgres:5432/postgres
REDIS_URL: redis://redis:6379
SECRET_VAULT_KEK: DtPWS09unRXGuRScB60qXqCSsrjd22dUlXt/0oZgxSo=
STATUS_API_KEY: test-status-api-key
TRUST_PROXY_HEADER: "1"
COVERAGE: ${COVERAGE:-0}
COVERAGE_REPORT_DIR: /coverage/report
COVERAGE_TEMP_DIR: /coverage/raw
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 3001 || exit 1"]
interval: 3s
timeout: 3s
retries: 30
ports:
- "3001:3001"
- "3002:3002"