Spaces:
Runtime error
Runtime error
| [supervisord] | |
| nodaemon=true | |
| logfile=/dev/stdout | |
| logfile_maxbytes=0 | |
| logfile_backups=0 | |
| [program:redis] | |
| command=/usr/bin/redis-server --save "" --appendonly no | |
| autostart=true | |
| autorestart=true | |
| stdout_logfile=/dev/stdout | |
| stdout_logfile_maxbytes=0 | |
| stderr_logfile=/dev/stderr | |
| stderr_logfile_maxbytes=0 | |
| priority=10 | |
| [program:postgres] | |
| command=/bin/bash -lc "if [ \"$USE_INTERNAL_POSTGRES\" = \"true\" ]; then \ | |
| mkdir -p /data/postgres && \ | |
| chown -R postgres:postgres /data/postgres && \ | |
| PG_BIN=$(pg_config --bindir 2>/dev/null || echo /usr/lib/postgresql/15/bin) && \ | |
| su - postgres -c \"$PG_BIN/initdb -D /data/postgres\" || true && \ | |
| su - postgres -c \"$PG_BIN/pg_ctl -D /data/postgres -l /data/postgres/logfile start\" && \ | |
| sleep 2 && \ | |
| su - postgres -c \"psql -tc \\\"SELECT 1 FROM pg_roles WHERE rolname='${POSTGRES_USER}'\\\" | grep -q 1 || psql -c \\\"CREATE USER ${POSTGRES_USER} WITH PASSWORD '${POSTGRES_PASSWORD}';\\\"\" && \ | |
| su - postgres -c \"psql -lqt | cut -d \\| -f 1 | grep -qw ${POSTGRES_DB} || createdb -O ${POSTGRES_USER} ${POSTGRES_DB}\" && \ | |
| tail -f /data/postgres/logfile; \ | |
| else \ | |
| echo 'USE_INTERNAL_POSTGRES != true; skipping postgres start' && tail -f /dev/null; \ | |
| fi" | |
| autostart=true | |
| autorestart=true | |
| stdout_logfile=/dev/stdout | |
| stdout_logfile_maxbytes=0 | |
| stderr_logfile=/dev/stderr | |
| stderr_logfile_maxbytes=0 | |
| priority=15 | |
| environment=POSTGRES_USER=%(ENV_POSTGRES_USER)s,POSTGRES_PASSWORD=%(ENV_POSTGRES_PASSWORD)s,POSTGRES_DB=%(ENV_POSTGRES_DB)s | |
| [program:celery] | |
| command=/bin/bash -lc "cd /app && celery -A app.tasks.celery_app worker --loglevel=INFO" | |
| autostart=true | |
| autorestart=true | |
| stdout_logfile=/dev/stdout | |
| stdout_logfile_maxbytes=0 | |
| stderr_logfile=/dev/stderr | |
| stderr_logfile_maxbytes=0 | |
| priority=20 | |
| [program:uvicorn] | |
| command=/bin/bash -lc "python -m app.main" | |
| autostart=true | |
| autorestart=true | |
| stdout_logfile=/dev/stdout | |
| stdout_logfile_maxbytes=0 | |
| stderr_logfile=/dev/stderr | |
| stderr_logfile_maxbytes=0 | |
| priority=30 | |