forked from CredenceOrg/Credence-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
42 lines (39 loc) · 1.1 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
42 lines (39 loc) · 1.1 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
version: "3.8"
services:
test-db:
image: postgres:16-alpine
environment:
POSTGRES_DB: credence_test
POSTGRES_USER: credence
POSTGRES_PASSWORD: credence
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U credence -d credence_test"]
interval: 5s
timeout: 3s
retries: 5
tmpfs:
- /var/lib/postgresql/data:rw,noexec,nosuid,size=100m
- /tmp:rw,noexec,nosuid,size=50m
test-redis:
image: redis:7-alpine
ports:
- "6380:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
test-horizon:
image: node:20-alpine
command: ["node", "/app/horizon-stub.js"]
volumes:
- ./tests/chaos/horizon-stub.js:/app/horizon-stub.js:ro
ports:
- "8000:8000"
healthcheck:
test: ["CMD-SHELL", "node -e \"const http = require('http'); const req = http.get('http://127.0.0.1:8000/health', res => process.exit(res.statusCode === 200 ? 0 : 1)); req.on('error', () => process.exit(1));\""]
interval: 5s
timeout: 3s
retries: 5