[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
user=1000
stderr_logfile=/var/log/auth.err.log
stdout_logfile=/var/log/auth.out.log

[program:storage-api]
directory=/supabase/storage-api
command=/bin/bash /supabase/storage-api/wrapper.sh
autorestart=true
stderr_logfile=/var/log/storage-api.err.log
stdout_logfile=/var/log/storage-api.out.log

[program:kong]
command=/bin/bash /supabase/kong/wrapper.sh
user=root
autorestart=true
redirect_stderr=true
stdout_logfile=auto


[program:chatai-ui]
command=/bin/bash /supabase/chatai-ui/wrapper.sh
user=root
autorestart=true
stderr_logfile=/var/log/chatai-ui.err.log
stdout_logfile=/var/log/chatai-ui.out.log
