Move nginx to supervisord

This commit is contained in:
Albrecht Lohofener
2024-02-18 22:49:50 +01:00
parent 22122a2529
commit 162332d8ee
4 changed files with 20 additions and 14 deletions
+2 -2
View File
@@ -27,8 +27,8 @@ RUN apk add --no-cache \
&& python3 -m venv /var/lib/script-server-env \
&& source /var/lib/script-server-env/bin/activate \
&& pip install -r /usr/share/script-server/requirements.txt \
&& sed -i 's/^worker_processes.*/worker_processes 1;/' /etc/nginx/nginx.conf
&& sed -i 's/^worker_processes.*/worker_processes 1;daemon off;/' /etc/nginx/nginx.conf
# Get OpenWrt images
RUN mkdir /var/vm \
&& if [ "$OPENWRT_VERSION" = "master" ] ; then \
-8
View File
@@ -70,14 +70,6 @@ else
echo "rootfs-${OPENWRT_VERSION}.img" > /storage/current_version
fi
# Enable VNC
info "Activating web VNC ..."
[ ! -f "$INFO" ] && error "File $INFO not found?!"
rm -f "$INFO"
[ ! -f "$PAGE" ] && error "File $PAGE not found?!"
rm -f "$PAGE"
# Check KVM
info "Checking for KVM ..."
KVM_ERR=""
+1 -1
View File
@@ -61,7 +61,7 @@ fi
# Start webserver
cp -r /var/www/* /run/shm
nginx -e stderr
supervisorctl start nginx
# ******* script-server handeling *******
# Ugly hack to enable iframe usage
+17 -3
View File
@@ -3,12 +3,26 @@ nodaemon=true
logfile=/dev/null
logfile_maxbytes=0
[program:entry]
[supervisorctl]
serverurl=unix:///var/run/supervisord.sock
[unix_http_server]
file = /var/run/supervisord.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:init]
command=/run/entry.sh
process_name=%(program_name)s
directory=/run
autostart=true
autorestart=false
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stderr_logfile_maxbytes=0
[program:nginx]
command=nginx
process_name=%(program_name)s
autostart=false