Permission updates
This commit is contained in:
parent
0546786fd9
commit
9a94e371ab
|
|
@ -81,8 +81,10 @@ RUN \
|
||||||
# PHP-FPM vhost config
|
# PHP-FPM vhost 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
|
# Make sure apache can read&right to docroot
|
||||||
RUN chown -R apache:apache /var/log/apache2 /var/www
|
RUN chown -R apache:apache /var/www
|
||||||
|
# Make sure apache can read&right to logs
|
||||||
|
RUN chown -R apache:apache /var/log/apache2
|
||||||
|
|
||||||
### Continue execution as Apache user ###
|
### Continue execution as Apache user ###
|
||||||
USER apache
|
USER apache
|
||||||
|
|
|
||||||
28
run.sh
28
run.sh
|
|
@ -1,22 +1,26 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Make sure apache can read&right to docroot
|
||||||
|
chown -R apache:apache /var/www
|
||||||
|
# Make sure apache can read&right to logs
|
||||||
|
chown -R apache:apache /var/log/apache2
|
||||||
|
|
||||||
# syslog option '-Z' was changed to '-t', change this in /etc/conf.d/syslog so that syslog (and then cron) actually starts
|
# syslog option '-Z' was changed to '-t', change this in /etc/conf.d/syslog so that syslog (and then cron) actually starts
|
||||||
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/9279
|
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/9279
|
||||||
sed -i 's/SYSLOGD_OPTS="-Z"/SYSLOGD_OPTS="-t"/g' /etc/conf.d/syslog
|
sed -i 's/SYSLOGD_OPTS="-Z"/SYSLOGD_OPTS="-t"/g' /etc/conf.d/syslog
|
||||||
# Start the kernel log deamon
|
# Restart the syslog
|
||||||
service klogd start
|
rc-service syslog restart
|
||||||
# Start the cron deamon
|
# Restart the kernel log deamon
|
||||||
service crond start
|
rc-service klogd restart
|
||||||
|
|
||||||
|
# Start the cron deamon by default
|
||||||
|
rc-update add crond default && rc-service crond start
|
||||||
|
# Start Apache by default
|
||||||
|
rc-update add httpd default && rc-service httpd start
|
||||||
|
# default PHP-FPM by default
|
||||||
|
rc-update add php-fpm7 default && rc-service php-fpm7 start
|
||||||
|
|
||||||
# Create cron job for Grav maintenance scripts
|
# Create cron job for Grav maintenance scripts
|
||||||
(crontab -l; echo "* * * * * cd /var/www/html;/usr/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab -
|
(crontab -l; echo "* * * * * cd /var/www/html;/usr/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab -
|
||||||
# Cron requires that each entry in a crontab end in a newline character. If the last entry in a crontab is missing the newline, cron will consider the crontab (at least partially) broken and refuse to install it.
|
# Cron requires that each entry in a crontab end in a newline character. If the last entry in a crontab is missing the newline, cron will consider the crontab (at least partially) broken and refuse to install it.
|
||||||
(crontab -l; echo "") | crontab -
|
(crontab -l; echo "") | crontab -
|
||||||
|
|
||||||
# Start Apache
|
|
||||||
service httpd start
|
|
||||||
# Start PHP-FPM
|
|
||||||
service php-fpm7 start
|
|
||||||
|
|
||||||
# Make sure apache can read&right to docroot
|
|
||||||
chown -R apache:apache /var/www
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue