fix(docker): start backend with 'taskpool server' under supervisord
Build and Deploy / build-and-push (push) Successful in 52s
Build and Deploy / build-and-push (push) Successful in 52s
This commit is contained in:
@@ -32,9 +32,12 @@ COPY nginx-standalone.conf /etc/nginx/http.d/default.conf
|
||||
# Copy supervisor config
|
||||
COPY supervisord.conf /etc/supervisord.conf
|
||||
|
||||
# Create data directories
|
||||
RUN mkdir -p /app/data /app/configs /app/envs /app/logs
|
||||
# Create data directories and ship example config (used when no volume config)
|
||||
COPY configs/config.example.ini /app/configs/config.example.ini
|
||||
RUN mkdir -p /app/data /app/configs /app/envs /app/logs \
|
||||
&& chmod +x /app/taskpool
|
||||
|
||||
WORKDIR /app
|
||||
EXPOSE 3000 8052
|
||||
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
||||
|
||||
+3
-11
@@ -1,17 +1,9 @@
|
||||
services:
|
||||
# Frontend - React Web UI
|
||||
frontend:
|
||||
image: git.viaeon.com/admin/taskpool-react:latest
|
||||
ports:
|
||||
- "3000:80"
|
||||
depends_on:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
|
||||
# Backend - Go API Server
|
||||
backend:
|
||||
# Standalone all-in-one image (nginx + backend via supervisord)
|
||||
app:
|
||||
image: git.viaeon.com/admin/taskpool:latest
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "8052:8052"
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
|
||||
+6
-2
@@ -5,13 +5,17 @@ pidfile=/var/run/supervisord.pid
|
||||
user=root
|
||||
|
||||
[program:backend]
|
||||
command=/app/taskpool
|
||||
command=/app/taskpool server
|
||||
directory=/app
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=3
|
||||
startretries=10
|
||||
stderr_logfile=/app/logs/backend.err.log
|
||||
stdout_logfile=/app/logs/backend.out.log
|
||||
environment=BH_SERVER_PORT="8052",BH_SERVER_HOST="0.0.0.0"
|
||||
stdout_logfile_maxbytes=10MB
|
||||
stderr_logfile_maxbytes=10MB
|
||||
environment=BH_SERVER_PORT="8052",BH_SERVER_HOST="0.0.0.0",BH_DB_TYPE="sqlite",BH_DB_PATH="/app/data/taskpool.db"
|
||||
|
||||
[program:nginx]
|
||||
command=nginx -g "daemon off;"
|
||||
|
||||
Reference in New Issue
Block a user