[supervisord]
nodaemon=true
logfile=/var/log/supervisord.log
loglevel=debug
pidfile=/tmp/supervisord.pid

[unix_http_server]
file=/var/run/supervisor.sock
chmod=0700

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock


[program:postgres]
command=/bin/bash /supabase/postgres/wrapper.sh
user=root
autorestart=true
stdout_logfile=/var/log/postgres.out.log
stderr_logfile=/var/log/postgres.err.log
environment=POSTGRES_PASSWORD="postgres"


[program:postgrest]
command=/bin/bash /supabase/postgrest/wrapper.sh
autorestart=true
user=root
stderr_logfile=/var/log/postgrest.err.log
stdout_logfile=/var/log/postgrest.out.log
environment=PGRST_DB_URI="postgres://postgres:postgres@localhost:5432/postgres",PGRST_DB_ANON_ROLE="anon",PGRST_DB_SCHEMA="public",PGRST_JWT_SECRET="super-secret-jwt-token-with-at-least-32-characters-long",PGRST_SERVER_PORT="3000",PGRST_LOG_LEVEL="debug"

[program:auth]
command=/bin/bash /supabase/gotrue/wrapper.sh
autorestart=true
stderr_logfile=/var/log/auth.err.log
stdout_logfile=/var/log/auth.out.log


# [program:kong]
# command=/supabase/kong/docker-entrypoint.sh kong docker-start
# autorestart=true
# stdout_logfile=/var/log/kong.out.log
# stderr_logfile=/var/log/kong.err.log
# environment=
#     KONG_DATABASE="postgres",
#     KONG_PG_HOST="127.0.0.1",
#     KONG_PG_PORT="5432",
#     KONG_PG_USER="supabase_admin",
#     KONG_PG_PASSWORD="postgres",
#     KONG_PG_DATABASE="postgres",
#     KONG_LOG_LEVEL="info",
#     KONG_PROXY_ACCESS_LOG="/dev/stdout",
#     KONG_ADMIN_ACCESS_LOG="/dev/stdout",
#     KONG_PROXY_ERROR_LOG="/dev/stderr",
#     KONG_ADMIN_ERROR_LOG="/dev/stderr",
#     KONG_PREFIX="/usr/local/kong"


# [program:storage-api]
# command=/usr/bin/node /supabase/storage-api/dist/start/server.js
# autorestart=true
# stderr_logfile=/var/log/storage-api.err.log
# stdout_logfile=/var/log/storage-api.out.log
# environment=
#     SERVER_PORT="5000",
#     AUTH_JWT_SECRET="f023d3db-39dc-4ac9-87b2-b2be72e9162b",
#     AUTH_JWT_ALGORITHM="HS256",
#     DATABASE_URL="postgres://postgres:postgres@127.0.0.1:5432/postgres",
#     DATABASE_POOL_URL="postgresql://postgres:postgres@127.0.0.1:6432/postgres",
#     DB_INSTALL_ROLES="true",
#     STORAGE_BACKEND="s3",
#     STORAGE_S3_BUCKET="supa-storage-bucket",
#     STORAGE_S3_ENDPOINT="http://127.0.0.1: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_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_TRANSFORMATION_ENABLED="true",
#     IMGPROXY_URL="http://127.0.0.1:8080",
#     IMGPROXY_REQUEST_TIMEOUT="15",
#     S3_PROTOCOL_ACCESS_KEY_ID="625729a08b95bf1b7ff351a663f3a23c",
#     S3_PROTOCOL_ACCESS_KEY_SECRET="850181e4652dd023b7a98c58ae0d2d34bd487ee0cc3254aed6eda37307425907"

