-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.e2e.yml
More file actions
61 lines (54 loc) · 1.74 KB
/
docker-compose.e2e.yml
File metadata and controls
61 lines (54 loc) · 1.74 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
59
# Docker Compose for E2E tests
#
# This setup runs multiple Replane instances to test replication scenarios:
# - replane-1: Admin API endpoint
# - replane-2: Edge/SDK API endpoint
# - replane-3: Extra instance for replication testing
#
# Usage:
# docker compose -f docker-compose.e2e.yml up -d
# SUPERUSER_API_KEY=<key> REPLANE_ADMIN_API_BASE_URL=http://localhost:8084 REPLANE_EDGE_API_BASE_URL=http://localhost:8085 pnpm test:e2e
# docker compose -f docker-compose.e2e.yml down
x-replane-common: &replane-common
build:
context: .
dockerfile: Dockerfile
depends_on:
postgres:
condition: service_healthy
environment: &replane-env
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/replane
BASE_URL: http://localhost:8080
SECRET_KEY: test-secret-key-for-e2e
SUPERUSER_API_KEY: ${SUPERUSER_API_KEY:-test-superuser-api-key-for-e2e}
TESTING_MODE: "true"
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:8080/api/health', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
interval: 10s
timeout: 5s
retries: 5
services:
postgres:
image: postgres:17
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: replane
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# Replane instance for admin API
replane-1:
<<: *replane-common
ports:
- "${REPLANE_ADMIN_API_PORT:-8084}:8080"
# Replane instance for edge/SDK API
replane-2:
<<: *replane-common
ports:
- "${REPLANE_EDGE_API_PORT:-8085}:8080"
# Extra Replane instance for replication testing
replane-3:
<<: *replane-common