mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-14 16:01:29 +00:00
Move nginx to supervisord
This commit is contained in:
+2
-2
@@ -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 \
|
||||
|
||||
@@ -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
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user