Perms updates
This commit is contained in:
parent
f5b58302e7
commit
c9e421922c
11
Dockerfile
11
Dockerfile
|
|
@ -68,6 +68,11 @@ RUN sed -i 's/LoadModule mpm_prefork_module/#LoadModule mpm_prefork_module/g' /e
|
||||||
# PHP-FPM config
|
# PHP-FPM config
|
||||||
COPY vhost.conf /etc/apache2/conf.d/vhost.conf
|
COPY vhost.conf /etc/apache2/conf.d/vhost.conf
|
||||||
|
|
||||||
|
# Make sure apache can read&right to logs and docroot
|
||||||
|
RUN chown -R apache:apache /var/log/apache2 /var/www
|
||||||
|
### Execute as Apache user ###
|
||||||
|
USER apache
|
||||||
|
|
||||||
# Define Grav specific version of Grav or use latest stable
|
# Define Grav specific version of Grav or use latest stable
|
||||||
ENV GRAV_VERSION latest
|
ENV GRAV_VERSION latest
|
||||||
|
|
||||||
|
|
@ -81,15 +86,13 @@ RUN curl -o grav-admin.zip -SL https://getgrav.org/download/core/grav-admin/${GR
|
||||||
# Create cron job for Grav maintenance scripts
|
# Create cron job for Grav maintenance scripts
|
||||||
RUN (crontab -l; echo "* * * * * cd /var/www/html;/usr/local/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab -
|
RUN (crontab -l; echo "* * * * * cd /var/www/html;/usr/local/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab -
|
||||||
|
|
||||||
RUN chown -R apache:apache /var/log/apache2 /var/www
|
|
||||||
|
|
||||||
# Accept incoming HTTP requests
|
# Accept incoming HTTP requests
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# Return to root user
|
### Return to root user ###
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
# provide container inside image for data persistence
|
# Provide container inside image for data persistence
|
||||||
VOLUME ["/var/www"]
|
VOLUME ["/var/www"]
|
||||||
|
|
||||||
COPY run.sh /run.sh
|
COPY run.sh /run.sh
|
||||||
|
|
|
||||||
2
run.sh
2
run.sh
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Make sure apache can read&right to /var/www
|
||||||
|
RUN chown -R apache:apache /var/log/apache2 /var/www
|
||||||
# Start PHP-FPM and Apache
|
# Start PHP-FPM and Apache
|
||||||
exec /usr/sbin/httpd -D FOREGROUND -f /etc/apache2/httpd.conf &
|
exec /usr/sbin/httpd -D FOREGROUND -f /etc/apache2/httpd.conf &
|
||||||
exec /usr/sbin/php-fpm7 -F
|
exec /usr/sbin/php-fpm7 -F
|
||||||
Loading…
Reference in New Issue