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 supervisor config
|
||||||
COPY supervisord.conf /etc/supervisord.conf
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
|
||||||
# Create data directories
|
# Create data directories and ship example config (used when no volume config)
|
||||||
RUN mkdir -p /app/data /app/configs /app/envs /app/logs
|
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
|
EXPOSE 3000 8052
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
||||||
|
|||||||
+3
-11
@@ -1,17 +1,9 @@
|
|||||||
services:
|
services:
|
||||||
# Frontend - React Web UI
|
# Standalone all-in-one image (nginx + backend via supervisord)
|
||||||
frontend:
|
app:
|
||||||
image: git.viaeon.com/admin/taskpool-react:latest
|
|
||||||
ports:
|
|
||||||
- "3000:80"
|
|
||||||
depends_on:
|
|
||||||
- backend
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
# Backend - Go API Server
|
|
||||||
backend:
|
|
||||||
image: git.viaeon.com/admin/taskpool:latest
|
image: git.viaeon.com/admin/taskpool:latest
|
||||||
ports:
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
- "8052:8052"
|
- "8052:8052"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/app/data
|
- ./data:/app/data
|
||||||
|
|||||||
+6
-2
@@ -5,13 +5,17 @@ pidfile=/var/run/supervisord.pid
|
|||||||
user=root
|
user=root
|
||||||
|
|
||||||
[program:backend]
|
[program:backend]
|
||||||
command=/app/taskpool
|
command=/app/taskpool server
|
||||||
directory=/app
|
directory=/app
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
|
startsecs=3
|
||||||
|
startretries=10
|
||||||
stderr_logfile=/app/logs/backend.err.log
|
stderr_logfile=/app/logs/backend.err.log
|
||||||
stdout_logfile=/app/logs/backend.out.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]
|
[program:nginx]
|
||||||
command=nginx -g "daemon off;"
|
command=nginx -g "daemon off;"
|
||||||
|
|||||||
Reference in New Issue
Block a user