adding supervisord for queue workers
Added supervisord to run the queue worker,. moved php-fpm and nginx to supervisord as well.
This commit is contained in:
parent
e24abe9626
commit
b370b2cb91
4 changed files with 72 additions and 23 deletions
19
Dockerfile
19
Dockerfile
|
@ -2,20 +2,25 @@ FROM alpine:3.8
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache --update ca-certificates certbot nginx dcron curl tini php7 php7-bcmath php7-common php7-dom php7-fpm php7-gd php7-mbstring php7-openssl php7-zip php7-pdo php7-phar php7-json php7-pdo_mysql php7-session php7-ctype php7-tokenizer php7-zlib php7-simplexml \
|
||||
RUN apk add --no-cache --update ca-certificates certbot nginx dcron curl tini php7 php7-bcmath php7-common php7-dom php7-fpm php7-gd php7-mbstring php7-openssl php7-zip php7-pdo php7-phar php7-json php7-pdo_mysql php7-session php7-ctype php7-tokenizer php7-zlib php7-simplexml supervisor \
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
COPY . ./
|
||||
|
||||
RUN cp .env.example .env \
|
||||
&& composer install --no-dev --optimize-autoloader \
|
||||
&& rm .env \
|
||||
&& chown -R nginx:nginx . && chmod -R 777 storage/* bootstrap/cache
|
||||
|
||||
RUN cp .dev/docker/default.conf /etc/nginx/conf.d/default.conf \
|
||||
&& cp .dev/docker/www.conf /etc/php7/php-fpm.d/www.conf \
|
||||
&& mkdir /var/run/php \
|
||||
&& cp .env.example .env \
|
||||
&& composer install --no-dev --optimize-autoloader \
|
||||
&& rm .env
|
||||
&& cat .dev/docker/supervisord.conf > /etc/supervisord.conf \
|
||||
&& echo "* * * * * /usr/bin/php /app/pterodactyl/artisan schedule:run >> /dev/null 2>&1" >> /var/spool/cron/crontabs/root \
|
||||
&& mkdir -p /var/run/php /var/run/nginx \
|
||||
&& mkdir -p /var/log/supervisord/
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
RUN chown -R nginx:nginx . && chmod -R 777 storage/* bootstrap/cache
|
||||
ENTRYPOINT ["/bin/ash", ".dev/docker/entrypoint.sh"]
|
||||
|
||||
ENTRYPOINT ["ash", ".dev/docker/entrypoint.sh"]
|
||||
CMD [ "supervisord", "-n", "-c", "/etc/supervisord.conf" ]
|
Loading…
Add table
Add a link
Reference in a new issue