-
-
Notifications
You must be signed in to change notification settings - Fork 115
/
docker-compose-multi-tenant.yml
121 lines (108 loc) · 3.05 KB
/
docker-compose-multi-tenant.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
# docker-compose.yml
version: '3'
services:
storage:
image: supabase/storage-api:latest
ports:
- '5000:5000'
- '5001:5001'
depends_on:
tenant_db:
condition: service_healthy
multitenant_db:
condition: service_healthy
supavisor:
condition: service_started
minio_setup:
condition: service_completed_successfully
environment:
# Server
SERVER_PORT: 5000
SERVER_REGION: local
# Auth
AUTH_JWT_SECRET: f023d3db-39dc-4ac9-87b2-b2be72e9162b
AUTH_JWT_ALGORITHM: HS256
AUTH_ENCRYPTION_KEY: encryptionkey
# Multi tenant Mode
MULTI_TENANT: true
DATABASE_MULTITENANT_URL: postgresql://postgres:postgres@multitenant_db:5432/postgres
SERVER_ADMIN_API_KEYS: apikey
SERVER_ADMIN_PORT: 5001
REQUEST_X_FORWARDED_HOST_REGEXP: "^([a-z]{20}).local.(?:com|dev)$"
# Migrations
DB_INSTALL_ROLES: true # set to false if you want to manage roles yourself
# Storage
STORAGE_BACKEND: s3
STORAGE_S3_BUCKET: supa-storage-bucket # name of s3 bucket where you want to store objects
STORAGE_S3_ENDPOINT: http://minio:9000
STORAGE_S3_FORCE_PATH_STYLE: "true"
STORAGE_S3_REGION: us-east-1
AWS_ACCESS_KEY_ID: supa-storage
AWS_SECRET_ACCESS_KEY: secret1234
# Upload
UPLOAD_FILE_SIZE_LIMIT: 524288000
UPLOAD_FILE_SIZE_LIMIT_STANDARD: 52428800
UPLOAD_SIGNED_URL_EXPIRATION_TIME: 120
TUS_URL_PATH: /upload/resumable
TUS_URL_EXPIRY_MS: 3600000
# Image Tranformation
IMAGE_TRANSFORMATION_ENABLED: "true"
IMGPROXY_URL: http://imgproxy:8080
IMGPROXY_REQUEST_TIMEOUT: 15
PG_QUEUE_ENABLE: "true"
tenant_db:
extends:
service: tenant_db
file: ./.docker/docker-compose-infra.yml
multitenant_db:
extends:
service: multitenant_db
file: ./.docker/docker-compose-infra.yml
supavisor:
extends:
service: supavisor
file: ./.docker/docker-compose-infra.yml
supavisor_setup:
depends_on:
supavisor:
condition: service_healthy
extends:
service: supavisor_setup
file: ./.docker/docker-compose-infra.yml
minio:
extends:
service: minio
file: ./.docker/docker-compose-infra.yml
minio_setup:
extends:
service: minio_setup
file: ./.docker/docker-compose-infra.yml
depends_on:
- minio
imgproxy:
extends:
service: imgproxy
file: ./.docker/docker-compose-infra.yml
# Optional for rate-limiting
# redis:
# extends:
# service: redis
# file: ./.docker/docker-compose-infra.yml
# Optional for monitoring:
# grafana:
# extends:
# service: grafana
# file: ./.docker/docker-compose-monitoring.yml
#
# prometheus:
# extends:
# service: prometheus
# file: ./.docker/docker-compose-monitoring.yml
#
# postgres_exporter:
# extends:
# service: postgres_exporter
# file: ./.docker/docker-compose-monitoring.yml
configs:
init.sql:
content: "CREATE SCHEMA IF NOT EXISTS _supavisor;"