-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
187 lines (166 loc) · 4.86 KB
/
docker-compose.yml
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# ------------------------------
# GovA11y Primary Stack
# ------------------------------
# Includes everything you need to get GovA11y running, but not the development tools
# For development tools, see the docker-compose in the /developer directory.
version: "3.8"
services:
# ------------------------------
# Databases
# ------------------------------
# ClickHouse | Analytics & Results
clickhouse:
image: gova11y/clickhouse:latest
hostname: db_clickhouse
ports:
- 7055:8123
- 7056:9000
- 7057:9009
- 7058:9005
environment:
- CLICKHOUSE_USER
- CLICKHOUSE_PASSWORD
volumes:
- clickhouse_data:/var/lib/clickhouse
- clickhouse_logs:/var/log/clickhouse-server
deploy:
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 5
window: 120s
networks:
- a11y
# Postgres | Source of Truth
postgres:
image: gova11y/postgres:latest
hostname: db_postgres
ports:
- 7050:5432
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
volumes:
- postgres_data:/var/lib/postgresql/data
deploy:
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 5
window: 120s
networks:
- a11y
# ------------------------------
# API
# ------------------------------
# GraphQL
graphql-engine:
image: hasura/graphql-engine:v2.33.0
container_name: hasura
hostname: hasura
ports:
- 7051:8080
restart: always
environment:
## postgres database to store Hasura metadata
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://hasura:SecretsOfHasura@db_postgres:5432/hasura
## Connection vars
PG_DATABASE_URL: postgres://hasura:SecretsOfHasura@db_postgres:5432/gova11y
## enable the console served by server
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
## enable debugging mode. It is recommended to disable this in production
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_EXPERIMENTAL_FEATURES: "naming_convention"
HASURA_GRAPHQL_REDIS_URL: "redis://db_redis:6379"
HASURA_GRAPHQL_RATE_LIMIT_REDIS_URL: "redis://hasura_redis:6379"
HASURA_GRAPHQL_MAX_CACHE_SIZE: "200"
HASURA_GRAPHQL_ADMIN_SECRET:
HASURA_GRAPHQL_METADATA_DEFAULTS: '{"backend_configs":{"dataconnector":{"athena":{"uri":"http://data-connector-agent:8081/api/v1/athena"},"mariadb":{"uri":"http://data-connector-agent:8081/api/v1/mariadb"},"mysql8":{"uri":"http://data-connector-agent:8081/api/v1/mysql"},"oracle":{"uri":"http://data-connector-agent:8081/api/v1/oracle"},"clickhouse":{"uri":"http://ch-data-connector-agent:8080"},"snowflake":{"uri":"http://data-connector-agent:8081/api/v1/snowflake"}}}}'
depends_on:
data-connector-agent:
condition: service_healthy
postgres:
required: true
condition: service_healthy
networks:
- a11y
# GraphQL Database Connection Agent
data-connector-agent:
image: hasura/graphql-data-connector:v2.33.0
hostname: data-connector-agent
restart: always
ports:
- 7052:8081
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/api/v1/athena/health"]
interval: 5s
timeout: 10s
retries: 5
start_period: 5s
networks:
- a11y
# GraphQL ClickHouse Connection Agent
ch-data-connector-agent:
image: gova11y/clickhouse_gdc_v2:latest
hostname: ch-data-connector-agent
restart: always
ports:
- 7059:8080
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 5s
timeout: 10s
retries: 5
start_period: 5s
networks:
- a11y
# ------------------------------
# Middleware
# ------------------------------
# RabbitMQ | Keeps Rabbits in Line
rabbitmq:
image: gova11y/rabbitmq:latest
hostname: rabbitmq
container_name: rabbitmq
ports:
- "4369:4369/tcp"
- "5672:5672/tcp"
- "15672:15672/tcp"
healthcheck:
test:
[
"CMD-SHELL",
"rabbitmqctl wait -q -t 5 /var/lib/rabbitmq/mnesia/[email protected]",
]
interval: 10s
timeout: 10s
retries: 3
deploy:
restart_policy:
condition: on-failure
networks:
- a11y
# ------------------------------
# Command & Control
# ------------------------------
# ------------------------------
# Workers & Nodes
# ------------------------------
# ------------------------------
# Networks & Volumes
# ------------------------------
networks:
a11y:
driver: bridge
ipam:
driver: default
config:
- subnet: "10.50.0.0/16"
gateway: "10.50.0.1"
ip_range: "10.50.0.0/24"
volumes:
postgres_data:
redis_data:
clickhouse_data:
clickhouse_logs: