-
-
Notifications
You must be signed in to change notification settings - Fork 254
Expand file tree
/
Copy pathdocker-compose-test.yml
More file actions
101 lines (96 loc) · 2.36 KB
/
docker-compose-test.yml
File metadata and controls
101 lines (96 loc) · 2.36 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# The containers that compose the project
services:
db:
image: postgres:13
restart: always
container_name: integration-tests-prisma
ports:
- '5432:5432'
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
POSTGRES_DB: tests
networks:
- keyshade-test
healthcheck:
test: ["CMD-SHELL", "pg_isready -U prisma"]
interval: 2s
timeout: 5s
retries: 15
start_period: 10s
redis:
image: redis:6
container_name: integration-tests-redis
ports:
- '6379:6379'
networks:
- keyshade-test
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 2s
timeout: 3s
retries: 15
start_period: 5s
# CI-only service for API Docker validation
api-ci:
image: keyshade/api:ci-${GITHUB_SHA:-latest}
container_name: api-ci
ports:
- "4200:4200"
environment:
NODE_ENV: e2e
DATABASE_URL: postgresql://prisma:prisma@db:5432/tests
REDIS_URL: redis://redis:6379
JWT_SECRET: ci-secret
DOMAIN: localhost
API_PORT: "4200"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- keyshade-test
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:4200/api/health"]
interval: 2s
timeout: 3s
retries: 15
start_period: 10s
profiles:
- ci-api
# CI-only service for Platform Docker validation
platform-ci:
image: keyshade/platform:ci-${GITHUB_SHA:-latest}
container_name: platform-ci
ports:
- "3025:3000"
networks:
- keyshade-test
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
interval: 2s
timeout: 3s
retries: 15
start_period: 10s
profiles:
- ci-platform
# CI-only service for Web Docker validation
web-ci:
image: keyshade/web:ci-${GITHUB_SHA:-latest}
container_name: web-ci
ports:
- "3000:3000"
networks:
- keyshade-test
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
interval: 2s
timeout: 3s
retries: 15
start_period: 10s
profiles:
- ci-web
networks:
keyshade-test:
driver: bridge