-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
153 lines (143 loc) · 3.82 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
153 lines (143 loc) · 3.82 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
services:
configurator:
build:
context: ./configurator
dockerfile: ./Dockerfile.dev
hostname: configurator.switchyard
ports:
- 3005:3000
volumes:
- ./configurator/:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
autoscale:
build:
context: ./autoscale
dockerfile: Dockerfile.dev
hostname: autoscale.switchyard
ports:
- 3004:3000
volumes:
- ./autoscale/:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
dashboard:
build:
context: ./dashboard
dockerfile: Dockerfile.dev
ports:
- 3003:3000
volumes:
- ./dashboard/:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
incident:
build:
context: ./incident
dockerfile: Dockerfile.dev
hostname: incident-reporting.switchyard
ports:
- 3002:3000
volumes:
- ./incident/:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
feature-flags:
build:
context: ./feature-flags
dockerfile: Dockerfile.dev
hostname: feature-flags.switchyard
ports:
- 3001:3000
volumes:
- ./feature-flags:/app
depends_on:
- postgres
- redis
scheduler:
build:
context: ./scheduler
dockerfile: Dockerfile.dev
ports:
- 3000:3000
hostname: scheduler.switchyard
volumes:
- ./scheduler/:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
rabbitmq:
condition: service_healthy
rabbitmq:
image: rabbitmq:latest
container_name: rabbitmq
hostname: rabbitmq.switchyard
restart: always
ports:
- 5672:5672
- 15672:15672
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
environment:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: admin
configs:
- source: rabbitmq-plugins
target: /etc/rabbitmq/enabled_plugins
volumes:
- rabbitmq-lib:/var/lib/rabbitmq/
- rabbitmq-log:/var/log/rabbitmq
redis:
image: "redis:alpine"
hostname: redis.switchyard
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
postgres:
image: postgres:14-alpine
hostname: postgres.switchyard
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U root -d postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
- ./postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=secret
- POSTGRES_USER=root
- POSTGRES_DB=postgres
volumes:
postgres-data:
rabbitmq-lib:
driver: local
rabbitmq-log:
driver: local
configs:
rabbitmq-plugins:
content: "[rabbitmq_management]."