From 15ebad721c71bec8f47166041406329c923aa433 Mon Sep 17 00:00:00 2001 From: houghtelin Date: Wed, 10 Feb 2021 18:22:01 -0500 Subject: [PATCH] Start winning on the first try! #WINNING --- Dockerfile | 2 +- docker/startup.sh | 6 +++++- docker/supervisord.conf | 19 ------------------- 3 files changed, 6 insertions(+), 21 deletions(-) delete mode 100644 docker/supervisord.conf diff --git a/Dockerfile b/Dockerfile index 95b71cd..f190594 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM php:7.4-fpm-alpine -RUN apk add --no-cache nginx supervisor wget +RUN apk add --no-cache nginx wget RUN mkdir -p /run/nginx diff --git a/docker/startup.sh b/docker/startup.sh index 30fae85..bb09209 100755 --- a/docker/startup.sh +++ b/docker/startup.sh @@ -2,4 +2,8 @@ sed -i "s,LISTEN_PORT,$PORT,g" /etc/nginx/nginx.conf -/usr/bin/supervisord -c /app/docker/supervisord.conf +php-fpm -D + +while ! nc -w 1 -z 127.0.0.1 9000; do sleep 0.1; done; + +nginx diff --git a/docker/supervisord.conf b/docker/supervisord.conf deleted file mode 100644 index 5e79d6a..0000000 --- a/docker/supervisord.conf +++ /dev/null @@ -1,19 +0,0 @@ -[supervisord] -nodaemon=true -stopasgroup=true - -[program:php-fpm] -command=php-fpm -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 - -[program:nginx] -command=nginx -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 - -