-
Notifications
You must be signed in to change notification settings - Fork 510
Expand file tree
/
Copy pathsupervisord.conf
More file actions
110 lines (98 loc) · 5.54 KB
/
supervisord.conf
File metadata and controls
110 lines (98 loc) · 5.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
loglevel=info
pidfile=/var/run/supervisord.pid
environment=DATABASE_URL="postgresql://postgres:password@localhost:5432/helicone_test"
# Note that all these services run internally, and thus actually use the internal ports.
# This is why we specify CLICKHOUSE_HOST in the docker-compose.yml file.
# Additionally, the ports for MinIO are different from the default 9000, since it conflicts with Clickhouse.
# TODO: add a better way to load env vars from file
[program:postgresql]
command=/usr/lib/postgresql/17/bin/postgres -D /var/lib/postgresql/17/main -c config_file=/etc/postgresql/17/main/postgresql.conf
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/postgresql.err.log
stdout_logfile=/var/log/supervisor/postgresql.out.log
user=postgres
[program:clickhouse]
command=/usr/bin/clickhouse-server --config-file=/etc/clickhouse-server/config.xml
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/clickhouse.err.log
stdout_logfile=/var/log/supervisor/clickhouse.out.log
user=clickhouse
[program:jawn]
command=yarn start
directory=/app/valhalla/jawn
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/jawn.err.log
stdout_logfile=/var/log/supervisor/jawn.out.log
stdout_logfile_maxbytes=50MB
stderr_logfile_maxbytes=50MB
user=root
; S3_ENDPOINT and BETTER_AUTH_SECRET can be overridden via Docker env vars for remote deployments
environment=S3_ACCESS_KEY="%(ENV_S3_ACCESS_KEY)s",S3_SECRET_KEY="%(ENV_S3_SECRET_KEY)s",S3_ENDPOINT="%(ENV_S3_ENDPOINT)s",S3_PROMPT_BUCKET_NAME="%(ENV_S3_PROMPT_BUCKET_NAME)s",S3_BUCKET_NAME="%(ENV_S3_BUCKET_NAME)s",KAFKA_CREDS='{"KAFKA_ENABLED": "false", "UPSTASH_KAFKA_BROKER": "localhost:9092", "UPSTASH_KAFKA_URL": "http://localhost:9092", "LOCAL_KAFKA": true}',OPENROUTER_WORKER_URL="http://localhost:8788",OPENAI_API_KEY="sk-...",OPENROUTER_API_KEY="sk-....",PROVIDER_KEYS='{ "DEMO_OPENAI_API_KEY": "sk-..." }',CSB_API_KEY="sk-...",TOGETHER_API_KEY="sk-...",STRIPE_SECRET_KEY="sk_dummy_key_12345678901234567890123456789012345678901234567890",NEXT_PUBLIC_BETTER_AUTH="true",BETTER_AUTH_SECRET="%(ENV_BETTER_AUTH_SECRET)s",DATABASE_URL="http://localhost:8123",SUPABASE_DATABASE_URL="postgresql://postgres:password@localhost:5432/helicone_test",HELICONE_WORKER_URL="http://localhost:8585/v1/gateway/oai",NODE_ENV="development",LOG_LEVEL="debug"
[program:web]
command=yarn start
directory=/app/web
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/web.err.log
stdout_logfile=/var/log/supervisor/web.out.log
user=root
; NEXT_PUBLIC_HELICONE_JAWN_SERVICE must be set to public URL for remote deployments (browser connects to this)
environment=VERCEL="1",VERCEL_ENV="development",NEXT_PUBLIC_SLACK_CLIENT_ID="1234567890",SLACK_CLIENT_SECRET="1234567890",NEXT_PUBLIC_BASE_PATH="https://oai.helicone.ai/v1",NEXT_PUBLIC_HELICONE_JAWN_SERVICE="%(ENV_NEXT_PUBLIC_HELICONE_JAWN_SERVICE)s",DATABASE_URL="postgresql://postgres:password@localhost:5432/helicone_test",BETTER_AUTH_SECRET="%(ENV_BETTER_AUTH_SECRET)s",NEXT_PUBLIC_BETTER_AUTH="true"
[program:flyway-migrate]
command=/bin/bash -c "until pg_isready -U postgres; do echo 'Waiting for PostgreSQL...'; sleep 2; done && flyway migrate"
autostart=true
autorestart=false
startsecs=0
startretries=3
stderr_logfile=/var/log/supervisor/flyway.err.log
stdout_logfile=/var/log/supervisor/flyway.out.log
[program:clickhouse-migrate]
command=/bin/bash -c "until curl -s http://localhost:8123/ping > /dev/null; do echo 'Waiting for ClickHouse...'; sleep 2; done && python3 /app/clickhouse/ch_hcone.py --upgrade --no-password --host localhost --port 8123"
autostart=true
autorestart=false
startsecs=0
startretries=3
stderr_logfile=/var/log/supervisor/clickhouse-migrate.err.log
stdout_logfile=/var/log/supervisor/clickhouse-migrate.out.log
[program:minio]
command=/usr/local/bin/minio server /data --address ":9080" --console-address ":9001"
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/minio.err.log
stdout_logfile=/var/log/supervisor/minio.out.log
user=root
environment=MINIO_ROOT_USER="minioadmin",MINIO_ROOT_PASSWORD="minioadmin"
[program:minio-setup]
command=/bin/sh -c "until curl -f http://localhost:9080/minio/health/live > /dev/null 2>&1; do echo 'Waiting for MinIO...'; sleep 2; done && /usr/local/bin/mc alias set localminio http://localhost:9080 minioadmin minioadmin && /usr/local/bin/mc mb --ignore-existing localminio/request-response-storage && /usr/local/bin/mc mb --ignore-existing localminio/prompt-body-storage && /usr/local/bin/mc mb --ignore-existing localminio/hql-store && exit 0"
autostart=true
autorestart=false
startsecs=0
startretries=3
stderr_logfile=/var/log/supervisor/minio-setup.err.log
stdout_logfile=/var/log/supervisor/minio-setup.out.log
environment=MINIO_ROOT_USER="minioadmin",MINIO_ROOT_PASSWORD="minioadmin"
[program:ai-gateway]
command=yarn start
directory=/app/gateway
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/ai-gateway.err.log
stdout_logfile=/var/log/supervisor/ai-gateway.out.log
user=root
environment=PORT="8788",CLICKHOUSE_HOST="http://localhost:8123",DATABASE_URL="postgresql://postgres:password@localhost:5432/helicone_test"
[program:log-viewer]
command=/bin/bash -c "echo 'Log viewer started. Available logs:' && ls -la /var/log/supervisor/*.log && echo 'Use: docker exec -it <container> tail -f /var/log/supervisor/<service>.out.log' && sleep infinity"
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/log-viewer.err.log
stdout_logfile=/var/log/supervisor/log-viewer.out.log
user=root