-
Notifications
You must be signed in to change notification settings - Fork 207
/
docker-compose.infra.yaml
112 lines (105 loc) · 3.3 KB
/
docker-compose.infra.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
version: "3"
services:
pezzo-clickhouse-migrate:
image: ghcr.io/pezzolabs/pezzo/server:latest
build:
context: .
dockerfile: ./apps/server/Dockerfile
entrypoint: /bin/sh
working_dir: /app/clickhouse
command: -c "./migrate.sh"
environment:
CLICKHOUSE_HOST: clickhouse
CLICKHOUSE_PORT: "8123"
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: default
depends_on:
clickhouse:
condition: service_healthy
pezzo-prisma-migrate:
image: ghcr.io/pezzolabs/pezzo/server:latest
build:
context: .
dockerfile: ./apps/server/Dockerfile
entrypoint: /bin/sh
command: -c "npx prisma migrate deploy"
env_file:
- ./.env.docker
depends_on:
postgres:
condition: service_healthy
clickhouse:
image: clickhouse/clickhouse-server:23-alpine
environment:
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: default
volumes:
- ./volumes/clickhouse/data:/var/lib/clickhouse
- ./volumes/clickhouse/logs:/var/log/clickhouse-server
- ./clickhouse/config/users.d/config.xml:/etc/clickhouse-server/users.d/config.xml
- ./clickhouse/config/config.d/config.xml:/etc/clickhouse-server/config.d/config.xml
ports:
- "8123:8123"
- "9000:9000"
- "9004:9004"
healthcheck:
test: ["CMD-SHELL", 'clickhouse-client --query "SELECT 1"']
interval: 5s
timeout: 5s
retries: 3
postgres:
image: postgres:15-alpine3.17
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 3
supertokens:
image: supertokens/supertokens-postgresql:5.0
ports:
- "3567:3567"
depends_on:
postgres:
condition: service_healthy
env_file:
- ./.env.docker
environment:
POSTGRES_CONNECTION_URI: "${SUPERTOKENS_DATABASE_URL}"
healthcheck:
test: >
bash -c 'exec 3<>/dev/tcp/127.0.0.1/3567 && echo -e "GET /hello HTTP/1.1\r\nhost: 127.0.0.1:3567\r\nConnection: close\r\n\r\n" >&3 && cat <&3 | grep "Hello"'
interval: 10s
timeout: 5s
retries: 5
redis-stack-server:
image: redis/redis-stack-server:7.2.0-v0
container_name: redis-stack-server
ports:
- "6379:6379"
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 1s
timeout: 3s
retries: 5
local-kms:
image: nsmithuk/local-kms:latest
container_name: local-kms
entrypoint: "/bin/sh"
# Seeding the local-kms with a master key. "/init/seed.yaml" will be created based on the base64 encoded string below.
command: '-c "echo \"S2V5czoKICBTeW1tZXRyaWM6CiAgICBBZXM6CiAgICAgIC0gTWV0YWRhdGE6CiAgICAgICAgICBLZXlJZDogZGVtby1tYXN0ZXIta2V5CiAgICAgICAgQmFja2luZ0tleXM6CiAgICAgICAgICAtIDVjZGFlYWQyN2ZlN2RhMmRlNDc5NDVkNzNjZDZkNzllMzY0OTRlNzM4MDJmM2NkMzg2OWYxZDJjYjBiNWQ3YTkKCkFsaWFzZXM6CiAgLSBBbGlhc05hbWU6IGFsaWFzL3Rlc3RpbmcKICAgIFRhcmdldEtleUlkOiBkZW1vLW1hc3Rlci1rZXk=\" | base64 -d >> /init/seed.yaml && local-kms"'
ports:
- "9981:9981"
expose:
- "9981"
environment:
- "PORT=9981"
- "KMS_REGION=us-east-1"
volumes:
postgres_data: ~