-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
Copy pathdatabases.yaml
186 lines (178 loc) · 5.07 KB
/
databases.yaml
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
184
185
186
services:
postgres:
image: postgis/postgis:16-3.4
platform: linux/amd64
command:
- -F # turn fsync off for speed
- -N 1000 # increase max connections from 100 so we can run more HGEs
ports:
- 5432
environment:
POSTGRES_PASSWORD: "password" # you probably want to override this
volumes:
- /var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- psql -U "$${POSTGRES_USER:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRES_USER:-postgres}" < /dev/null
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
# setup for read replicas
postgresql-primary:
image: 'bitnami/postgresql:16'
ports:
- 5432
volumes:
- '/bitnami/postgresql'
environment:
- POSTGRESQL_REPLICATION_MODE=master
- POSTGRESQL_REPLICATION_USER=repl_user
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
- POSTGRESQL_USERNAME=hasura
- POSTGRESQL_PASSWORD=hasura
- POSTGRESQL_DATABASE=hasura
- ALLOW_EMPTY_PASSWORD=yes
healthcheck:
test:
- CMD-SHELL
- export PGPASSWORD="$${POSTGRESQL_PASSWORD:-password}"
- psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
postgresql-replica-1:
image: 'bitnami/postgresql:16'
ports:
- 5432
depends_on:
postgresql-primary:
condition: service_healthy
environment:
- POSTGRESQL_REPLICATION_MODE=slave
- POSTGRESQL_REPLICATION_USER=repl_user
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
- POSTGRESQL_MASTER_HOST=postgresql-primary
- POSTGRESQL_USERNAME=hasura
- POSTGRESQL_PASSWORD=hasura
- POSTGRESQL_MASTER_PORT_NUMBER=5432
- ALLOW_EMPTY_PASSWORD=yes
healthcheck:
test:
- CMD-SHELL
- export PGPASSWORD="$${POSTGRESQL_PASSWORD:-password}"
- psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
postgresql-replica-2:
image: 'bitnami/postgresql:16'
ports:
- 5432
depends_on:
postgresql-primary:
condition: service_healthy
environment:
- POSTGRESQL_REPLICATION_MODE=slave
- POSTGRESQL_REPLICATION_USER=repl_user
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
- POSTGRESQL_MASTER_HOST=postgresql-primary
- POSTGRESQL_USERNAME=hasura
- POSTGRESQL_PASSWORD=hasura
- POSTGRESQL_MASTER_PORT_NUMBER=5432
- ALLOW_EMPTY_PASSWORD=yes
healthcheck:
test:
- CMD-SHELL
- export PGPASSWORD="$${POSTGRESQL_PASSWORD:-password}"
- psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
citus:
image: citusdata/citus:11.3.0
platform: linux/amd64
command:
- -F # turn fsync off for speed
- -N 1000 # increase max connections from 100 so we can run more HGEs
- "-cclient_min_messages=error"
ports:
- 5432
environment:
POSTGRES_PASSWORD: "password" # you probably want to override this
volumes:
- /var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- psql -U "$${POSTGRES_USER:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRES_USER:-postgres}" < /dev/null
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
cockroach:
image: cockroachdb/cockroach:latest-v22.2
command:
- start-single-node
- --insecure
- --accept-sql-without-tls
init: true # doesn't shut down properly without this
ports:
- 26257
volumes:
- /cockroach/cockroach-data
healthcheck:
test:
- CMD-SHELL
- cockroach sql --insecure --execute "select 1;"
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
yugabyte:
image: yugabytedb/yugabyte
command:
- bin/yugabyted
- start
- --daemon=false
- --initial_scripts_dir=/
ports:
- "65009:5433"
environment:
YSQL_USER: "hasura"
YSQL_PASSWORD: "hasura"
YSQL_DB: "hasura"
volumes:
- /var/lib/postgresql/data
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
platform: linux/amd64
ports:
- 1433
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: "Password!"
MSSQL_SA_PASSWORD: "Password!"
volumes:
- /var/opt/mssql
healthcheck:
test:
- CMD-SHELL
- |
/opt/mssql-tools/bin/sqlcmd -U SA -P "$$SA_PASSWORD"
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
mysql:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: Password123#
ports:
- "3306:3306"