forked from supabase/realtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
82 lines (79 loc) · 2.53 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
version: '3'
services:
db:
image: supabase/postgres:14.1.0.105
container_name: realtime-db
ports:
- "5432:5432"
volumes:
- ./dev/postgres:/docker-entrypoint-initdb.d/
command: postgres -c config_file=/etc/postgresql/postgresql.conf
environment:
POSTGRES_HOST: /var/run/postgresql
POSTGRES_PASSWORD: postgres
tenant_db:
image: supabase/postgres:14.1.0.105
container_name: tenant-db
ports:
- "5433:5432"
command: postgres -c config_file=/etc/postgresql/postgresql.conf
environment:
POSTGRES_HOST: /var/run/postgresql
POSTGRES_PASSWORD: postgres
realtime:
depends_on:
- db
build: .
image: local/supabase/realtime:latest
container_name: realtime-server
ports:
- "4000:4000"
environment:
PORT: 4000
DB_HOST: host.docker.internal
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
DB_NAME: postgres
DB_ENC_KEY: supabaserealtime
DB_AFTER_CONNECT_QUERY: 'SET search_path TO _realtime'
API_JWT_SECRET: dc447559-996d-4761-a306-f47a5eab1623
FLY_ALLOC_ID: fly123
FLY_APP_NAME: realtime
SECRET_KEY_BASE: UpNVntn3cDxHJpq99YMc1T1AQgQpc8kfYTuRgBiYa15BLrx8etQoXz3gZv1/u2oq
ERL_AFLAGS: -proto_dist inet_tcp
ENABLE_TAILSCALE: "false"
DNS_NODES: "''"
ENABLE_ERL_CRASH_DUMP: true
ERL_CRASH_DUMP_FOLDER: /tmp
ERL_CRASH_DUMP_FILE_NAME: erl_crash.dump
ERL_CRASH_DUMP_S3_ENDPOINT: http://minio:9000
ERL_CRASH_DUMP_S3_REGION: us-east-1
ERL_CRASH_DUMP_S3_BUCKET: realtime
ERL_CRASH_DUMP_S3_KEY: minio-access-key
ERL_CRASH_DUMP_S3_SECRET: minio-secret-key
ERL_CRASH_DUMP_S3_HOST: minio
ERL_CRASH_DUMP_S3_PORT: 9000
ERL_CRASH_DUMP_S3_SSL: false
command: sh -c "/app/bin/migrate && /app/bin/realtime eval 'Realtime.Release.seeds(Realtime.Repo)' && /app/bin/server"
minio:
image: minio/minio
container_name: realtime-minio
ports:
- "9000:9000"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
command: server /data
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
mc alias set realtime-minio http://minio:9000 minio minio123;
mc admin user add realtime-minio user minio-secret-key;
mc admin user svcacct add --access-key minio-access-key --secret-key minio-secret-key realtime-minio user;
mc mb realtime-minio/realtime;
mc admin policy attach realtime-minio readwrite --user user
"