Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (94 loc) 路 2.96 KB
/
Copy pathdocker-compose.yml
File metadata and controls
99 lines (94 loc) 路 2.96 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
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: oss_igaming
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 10
# Integration-test cluster, separate from the dev database above. Its data is throwaway,
# so it trades durability for speed the same way CI does (80s -> 29s for the core tier):
# no WAL fsync, and the data dir lives in memory. Every start is a fresh cluster with
# `oss_igaming_test` already created; the suites migrate their own databases.
postgres-test:
image: postgres:16-alpine
command:
['postgres', '-c', 'fsync=off', '-c', 'full_page_writes=off', '-c', 'synchronous_commit=off']
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: oss_igaming_test
ports:
- '5434:5432'
tmpfs:
- /var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 10
# Durable inter-module broker (MESSAGE_BROKER overlay). OPT-IN via the `broker`
# profile for local broker testing: `docker compose --profile broker up`. The
# platform is headless - it ships no runnable API; a consumer app binds the
# broker by setting AMQP_URL and adding its own overlay. Management UI on
# :15672 (guest/guest). See ADR-0016.
rabbitmq:
# profiles: ['broker']
image: rabbitmq:3-management
ports:
- '5672:5672'
- '15672:15672'
healthcheck:
test: ['CMD', 'rabbitmq-diagnostics', '-q', 'ping']
interval: 10s
timeout: 5s
retries: 10
# Distributed CACHE + RATE_LIMITER + MESSAGE_BROKER + JOB_QUEUE reference backend.
# The real-infra kernel tests use `redis-test` below, not this one. A consumer app
# binds it by setting REDIS_URL (redis://localhost:6379) - createApp auto-binds the
# Redis adapters, no code change. See ADR-0028.
redis:
image: redis:7-alpine
command:
[
'redis-server',
'--maxmemory-policy',
'noeviction',
'--appendonly',
'yes',
'--appendfsync',
'everysec',
]
ports:
- '6379:6379'
volumes:
- redis_data:/data
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 5s
retries: 10
# Integration-test Redis, separate from the dev one above: the suites flush logical
# databases 0-15 between tests, which would wipe dev keys. Nothing is persisted.
redis-test:
image: redis:7-alpine
command:
['redis-server', '--maxmemory-policy', 'noeviction', '--save', '', '--appendonly', 'no']
ports:
- '6380:6379'
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 5s
retries: 10
volumes:
postgres_data:
redis_data: