Commit 995ec220 authored by Cameron Carney's avatar Cameron Carney

Removed dependency on supervisor

parent 56fb199b
......@@ -10,7 +10,7 @@ WORKDIR /var/www/html
RUN \
apk --update add curl gettext nginx php7 php7 php7-bcmath php7-common php7-dom php7-fpm php7-gd \
php7-memcached php7-mbstring php7-openssl php7-pdo php7-phar php7-json php7-pdo_mysql \
php7-session php7-simplexml php7-tokenizer php7-ctype php7-zlib php7-zip supervisor \
php7-session php7-simplexml php7-tokenizer php7-ctype php7-zlib php7-zip tini \
&& mkdir -p /var/www/html /run/nginx
RUN \
......@@ -32,6 +32,6 @@ VOLUME [ "/data" ]
# Expose HTTP and HTTPS ports
EXPOSE 80 443
ENTRYPOINT [ "/bin/ash", "/entrypoint.sh" ]
ENTRYPOINT [ "/sbin/tini", "--", "/entrypoint.sh" ]
CMD [ "p:start" ]
......@@ -80,21 +80,17 @@ function startServer {
cat /etc/nginx/templates/http.conf > /etc/nginx/conf.d/default.conf
fi
# Copy service files to runtime files
rm -rf /var/run/supervisor.d/
mkdir /var/run/supervisor.d/
# Determine if workers should be enabled or not
if [ "${DISABLE_WORKERS}" != "true" ]; then
cp /etc/supervisor.d/runtime-files/* /var/run/supervisor.d/
/usr/sbin/crond -f -l 0 &
php /var/www/html/artisan queue:work database --queue=high,standard,low --sleep=3 --tries=3 &
else
echo "[Warning] Disabling Workers (pteroq & cron); It is recommended to keep these enabled unless you know what you are doing."
cp /etc/supervisor.d/runtime-files/nginx.ini \
/etc/supervisor.d/runtime-files/php-fpm.ini \
/var/run/supervisor.d/
fi
exec supervisord --nodaemon -c /etc/supervisord.conf
/usr/sbin/php-fpm7 --nodaemonize -c /etc/php7 &
exec /usr/sbin/nginx -g "daemon off;"
}
## Start ##
......
[program:cron]
command=/usr/sbin/crond -f -l 0
autostart=true
autorestart=true
priority=10
stdout_events_enabled=true
stderr_events_enabled=true
\ No newline at end of file
[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
autostart=true
autorestart=true
priority=10
stdout_events_enabled=true
stderr_events_enabled=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
\ No newline at end of file
[program:php-fpm]
command=/usr/sbin/php-fpm7 --nodaemonize -c /etc/php7
autostart=true
autorestart=true
priority=5
[program:pterodactyl-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/artisan queue:work database --queue=high,standard,low --sleep=3 --tries=3
autostart=true
autorestart=true
user=nginx
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/html/storage/logs/queue-worker.log
\ No newline at end of file
[supervisord]
[include]
files = /var/run/supervisor.d/*.ini
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment