grav
This commit is contained in:
@@ -6,15 +6,15 @@ ARG DEV_PKGS="zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev \
|
||||
libcurl4-gnutls-dev libxml2-dev libonig-dev"
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y imagemagick git bash procps wget unzip dumb-init \
|
||||
apt-get install -y git bash procps wget unzip supervisor \
|
||||
php-fpm php-gd php-json php-curl php-dom php-xml php-yaml php-apcu \
|
||||
php-opcache php-simplexml php-zip php-mbstring \
|
||||
php-opcache php-simplexml php-zip php-mbstring cron \
|
||||
&& mkdir /var/www \
|
||||
&& chown www-data:www-data /var/www \
|
||||
&& cd /var/www
|
||||
|
||||
# CLeanup
|
||||
RUN apt-get remove -y --purge ${DEV_PKGS} && \
|
||||
RUN apt-get remove -y --purge ${DEV_PKGS} exim4* && \
|
||||
apt-get autoremove --purge -y && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
@@ -24,8 +24,11 @@ RUN mkdir /run/php && \
|
||||
chown www-data:www-data /var/log /run/php && \
|
||||
mkdir -p /etc/php/7.3/fpm/pool.d
|
||||
ADD docker-entrypoint.sh /
|
||||
ADD supervisor.conf /etc/supervisor.conf
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
USER www-data
|
||||
CMD ["dumb-init", "/usr/sbin/php-fpm7.3", "--nodaemonize", "--force-stderr"]
|
||||
#USER www-data
|
||||
RUN (crontab -l; echo "* * * * * cd /var/www/grav;/usr/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab -u www-data -
|
||||
#CMD ["dumb-init", "/usr/sbin/php-fpm7.3", "--nodaemonize", "--force-stderr"]
|
||||
CMD ["supervisord", "-c", "/etc/supervisor.conf"]
|
||||
|
||||
@@ -47,6 +47,7 @@ spec:
|
||||
- >-
|
||||
wget -O /grav.zip "https://getgrav.org/download/core/grav-admin/latest" &&
|
||||
unzip -q /grav.zip &&
|
||||
rm -rf grav-admin/user/pages/* &&
|
||||
cp -ru grav-admin/* /workdir/ &&
|
||||
rm -rf /grav.zip &&
|
||||
rm -rf /grav-admin &&
|
||||
|
||||
14
apps/web/grav/supervisor.conf
Normal file
14
apps/web/grav/supervisor.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:cron]
|
||||
command=/usr/sbin/cron
|
||||
killasgroup=true
|
||||
stopasgroup=true
|
||||
redirect_stderr=true
|
||||
user=root
|
||||
|
||||
|
||||
[program:php-fpm]
|
||||
command=/usr/sbin/php-fpm7.3 --nodaemonize --force-stderr
|
||||
user=www-data
|
||||
Reference in New Issue
Block a user