Skip to content

Commit

Permalink
[Fix] 🐛 CodeSandbox Deploy Error Harry-zklcdc#394
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-zklcdc committed Apr 6, 2024
1 parent d020050 commit 44f4902
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 15 deletions.
8 changes: 7 additions & 1 deletion .codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,11 @@
"setupTasks": [],

// These tasks can be run from CodeSandbox. Running one will open a log in the app.
"tasks": {}
"tasks": {
"supervisor": {
"name": "supervisor",
"command": "/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisor.conf",
"runAtStart": true
}
}
}
4 changes: 3 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ RUN wget https://github.com/Harry-zklcdc/go-bingai-pass/releases/latest/download
tar -zxvf go-bingai-pass-linux-amd64.tar.gz && \
chmod +x go-bingai-pass

RUN rm go-bingai-pass-linux-amd64.tar.gz go-proxy-bingai-linux-amd64.tar.gz
RUN rm go-bingai-pass-linux-amd64.tar.gz go-proxy-bingai-linux-amd64.tar.gz

COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf
6 changes: 4 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"dockerComposeFile": "docker-compose.yml",
"service": "go-bingai-pass",
"name": "Go Proxy BingAI ByPass",
"build": {
"dockerfile": "./Dockerfile"
}
}
11 changes: 0 additions & 11 deletions .devcontainer/docker-compose.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .devcontainer/supervisor.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[supervisord]
logfile=/var/log/supervisor/supervisord.log
logfile_maxbytes=10MB
logfile_backups=10
loglevel=info
pidfile=supervisord.pid
nodaemon=true
childlogdir=/var/log/supervisor

[inet_http_server]
port=127.0.0.1:9005

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

[supervisorctl]
serverurl=http://127.0.0.1:9005

[program:xvfb]
priority=0
environment=START_XVFB=true
command=/opt/bin/start-xvfb.sh
autostart=true
autorestart=true

;Logs
redirect_stderr=false
stdout_logfile=/var/log/supervisor/xvfb-stdout.log
stderr_logfile=/var/log/supervisor/xvfb-stderr.log
stdout_logfile_maxbytes=50MB
stderr_logfile_maxbytes=50MB
stdout_logfile_backups=5
stderr_logfile_backups=5
stdout_capture_maxbytes=50MB
stderr_capture_maxbytes=50MB

[program:go-bingai-pass]
command=/app/go-bingai-pass
directory=/app
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
autostart=true
autorestart=true
startsecs=5
stopwaitsecs=5
killasgroup=true

0 comments on commit 44f4902

Please sign in to comment.