122 lines
3.0 KiB
YAML
122 lines
3.0 KiB
YAML
# 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;"
|