[supervisord]
nodaemon=true
logfile=/dev/stdout
logfile_maxbytes=0
loglevel=info

[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
redirect_stderr=true
stdout_logfile_maxbytes = 0
stderr_logfile_maxbytes = 0

[program:php-fpm]
command=/usr/local/sbin/php-fpm -F
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
redirect_stderr=true
stdout_logfile_maxbytes = 0
stderr_logfile_maxbytes = 0

[program:nodejs]
command=yarn start
directory=/app/frontend
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
redirect_stderr=true
stdout_logfile_maxbytes = 0
stderr_logfile_maxbytes = 0
environment=NODE_ENV="production",VITE_API_URL_CLIENT="%(ENV_VITE_API_URL_CLIENT)s",VITE_API_URL_SERVER="http://localhost:80/api",VITE_FRONTEND_URL="%(ENV_VITE_FRONTEND_URL)s",VITE_STRIPE_PUBLISHABLE_KEY="%(ENV_VITE_STRIPE_PUBLISHABLE_KEY)s"

[program:laravel-queue-worker]
command=php /app/backend/artisan queue:work --queue=default,webhook-queue --sleep=3 --tries=3 --timeout=60
autostart=true
autorestart=true
user=www-data
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
redirect_stderr=true
stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0
