-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
executable file
·211 lines (204 loc) · 6.98 KB
/
docker-compose.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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
version: '3.9'
services:
hasura-engine:
container_name: hasura_engine
image: hasura/graphql-engine:v2.38.0
ports:
- '8080:8080'
depends_on:
db:
condition: service_healthy
env_file:
- .env.local
environment:
HASURA_GRAPHQL_ENABLE_CONSOLE: 'false'
HASURA_GRAPHQL_DEV_MODE: 'true'
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ENABLE_TELEMETRY: 'false'
HASURA_GRAPHQL_JWT_SECRETS: |
[
{
"claims_map": {
"x-hasura-allowed-roles": ["user", "anonymous"],
"x-hasura-client-id": {
"default": "",
"path": "$$.clientId"
},
"x-hasura-default-role": "user",
"x-hasura-role": {
"default": "",
"path": "$$.role"
},
"x-hasura-user-id": {
"default": "",
"path": "$$.user.id"
},
"x-hasura-username": {
"default": "",
"path": "$$.name"
}
},
"header": {
"name": "next-auth.session-token",
"type": "Cookie"
},
"key": "-----BEGIN RSA PUBLIC KEY-----\nMIICCgKCAgEAtHmpqKfTdp2DNnolB3B8FrDxm64vbOXiH14GFT77PqcMtlssyFKk\nR2Ak6bpCa63tRuTJmrItMOYEmTmTfOAi0ttVqnTSdLrMLYpGR6dLl6tbUAIOYiJ9\nTbPsZaEPbBEGiG/vTe9kpdGQG66q+QydmrGRmZd1JQnC2fXo3ZpVT1URrpL50UCR\nbXH1rVBfuhd1lkpItszZxJ4T4M6JSzMfCkNG3TyezRHytecNftAJICeaEtMHV+2Z\nJ/Dy8+DL5CuRhyLDOyGDsjaQi6Wj8tLFNGg3BX/uXL47iqdtGT5ucYgNF9X9zxTv\nQ21pC+bZCnVN2B0ucJtMH+vXVb1iwqKjnxKEXfdqyLpux4LCZM9lTpScf2yXJKGF\nX3kTTLy/vQESXUxCiSO4p0OIuQKbS5Zj/i3d4rpXhC1Q3aE2KXVm/OXrv9lyN33P\n46BbzKHP8wwRSlBd1wMCn6RGw2+SdP+jdjNp3bawdvRoktk2t2FWGXn22fngk1z2\nazs0aBzW373nuhUBz6vOPAzxIxIjsmTIcYq5uU35ozxtn4bToaHvVefF7LjT1tyT\nbN6vUjMOJsOpK3hoGOzHHBMH+HZhAZvehb02peNABIceaXXsnrTZDn9BJul6795d\n4lQt6kH4hrgZ/DgF7ENg51MKP2gBszVMWvf+tA8ZSNDbvfo6BrGC4qUCAwEAAQ==\n-----END RSA PUBLIC KEY-----\n",
"type": "RS256"
},
{
"claims_map": {
"x-hasura-allowed-roles": [
"user",
"organizer_super_admin",
"organizer_admin",
"organizer_operations_manager",
"organizer_finance_manager",
"organizer_content_manager",
"organizer_validator",
"organizer_auditor",
"organizer_guest",
"organizer_human_resources"
],
"x-hasura-client-id": {
"default": "",
"path": "$$.clientId"
},
"x-hasura-default-role": "user",
"x-hasura-role": {
"default": "",
"path": "$$.user.role.role"
},
"x-hasura-organizer-id": {
"default": "",
"path": "$$.user.role.organizerId"
},
"x-hasura-event-id": {
"path": "$$.user.role.eventId",
"default": ""
},
"x-hasura-user-id": {
"default": "",
"path": "$$.user.id"
},
"x-hasura-username": {
"default": "",
"path": "$$.name"
}
},
"header": {
"name": "next-auth.session-token.back-office",
"type": "Cookie"
},
"key": "-----BEGIN RSA PUBLIC KEY-----\nMIICCgKCAgEAwJV6d9yS6R+jubxhbueB7+0GK9jWbld2kiBPdppXMuG/+oqvMs1n\nq51oOrjt9N6zEK9otJ/xbRu0D+tRruZvL0N3HG5F+zPFQFcRrGjZSz+5l/p9odc9\nA8xRzeKuLFjDnzcMC4J2njUTXPuZKvp2HMN6sXC28zNYXrbxgfBDvpPkuU00tSoe\nxTR80Q1A5dQs4FL5Kd8LaL9osKaFo3KLyW3KKlfYJS2I56vtJedcKKRJ0WqVZEjJ\n9S5viDFf7lu7kTRZ/jlFmFrZSKFLf5f22+XFABNVMIKfPeMlGJxaTk2/K4E7MU7d\nbYZsbUqV8mncUC3p4zApjKp4kdQnja3yRGiUIjjjF9u/yyqorQd/UCK/2Tkz2Gow\ntEwvWOzCD1KIhOsRxuk4ympHw0RTo0rsiMB+l9E01koe6KfkYJ6bauFL37aNjSyn\npUiR3bDoZVRlNrPFGoCwr0vv0VaKTyxD8+yt+UEwwkMUeXVL7Gz9tyq21nxX8mSt\nICVKemE8mjIXp/fWeRwynchfc3D7HrVvmtgn2hFyJOtRFNJy+D0xvxaoEqCbQvSY\npUEgB9c6HTmDooEjI+H5oBVwZIYYtw/Znv40rF06uPR+JhMgy1nILvCBjtn90ibL\nwyw0JINto6lbeNko39IyOzk7zpbtuNnxbQY731cAkXvGcRVRsW7c6S0CAwEAAQ==\n-----END RSA PUBLIC KEY-----\n",
"type": "RS256"
}
]
healthcheck:
test:
[
'CMD-SHELL',
'apt-get update -y && apt-get install -y curl && curl --fail http://localhost:8080/healthz || exit 1',
]
interval: 5s
timeout: 3s
retries: 30
networks:
- web
- db
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=web'
- 'traefik.http.routers.hasura-engine.rule=Host(`hasura-engine.postgres.test`)'
restart: unless-stopped
extra_hosts:
- 'host.docker.internal:host-gateway'
hasura-console:
container_name: hasura-console
image: sebpalluel/hasura_cli_with_socat_and_curl:latest
# build:
# context: ./hasura
# dockerfile: Dockerfile
volumes:
- ./hasura:/usr/src/hasura
- ./.env.local:/usr/src/hasura/app/.env
env_file:
- .env.local
environment:
HASURA_GRAPHQL_ADDRESS: 127.0.0.1
HASURA_RUN_CONSOLE: 'true'
ports:
- '9695:9695'
- '9693:9693'
extra_hosts:
- 'host.docker.internal:host-gateway'
networks:
- web
- db
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=web'
- 'traefik.http.services.hasura-console.loadbalancer.server.port=9695'
- 'traefik.http.routers.hasura-console.rule=Host(`hasura-console.postgres.test`)'
depends_on:
db:
condition: service_healthy
command: './start.sh'
# tty: true
restart: unless-stopped
mailhog:
container_name: mailhog
image: mailhog/mailhog
logging:
driver: 'none' # disable saving logs
ports:
- '1025:1025' # smtp server
- '8025:8025' # mailcatcher web interface
networks:
- web
extra_hosts:
- 'host.docker.internal:host-gateway'
env_file:
- .env.local
restart: on-failure
db:
container_name: db
image: postgres:16
volumes:
- db_data:/var/lib/postgresql/data
ports:
- '5432:5432'
networks:
- db
restart: unless-stopped
env_file:
- .env.local
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 2s
timeout: 2s
retries: 10
extra_hosts:
- 'host.docker.internal:host-gateway'
redis:
image: redis
restart: unless-stopped
ports:
- '6379:6379'
serverless-redis-http:
ports:
- '8079:80'
image: hiett/serverless-redis-http:latest
environment:
SRH_MODE: env
SRH_TOKEN: example_token
SRH_CONNECTION_STRING: 'redis://redis:6379'
restart: unless-stopped
extra_hosts:
- 'host.docker.internal:host-gateway'
volumes:
db_data:
networks:
web:
driver: bridge
db:
driver: bridge