diff options
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | files/etc/apache2/conf.d/davical.conf | 7 | ||||
-rwxr-xr-x | files/usr/local/bin/entrypoint.sh | 4 | ||||
-rwxr-xr-x | files/var/www/app/dba/pre_upgrade_install.sh | 10 |
4 files changed, 17 insertions, 9 deletions
@@ -1,3 +1,8 @@ # Davical Initial README + + +## Upgrading +When you need to upgrade the database, remember to run the +`pre_upgrade_install.sh`-script to install the packages you need. diff --git a/files/etc/apache2/conf.d/davical.conf b/files/etc/apache2/conf.d/davical.conf index 482eff6..91c2275 100644 --- a/files/etc/apache2/conf.d/davical.conf +++ b/files/etc/apache2/conf.d/davical.conf @@ -11,12 +11,7 @@ AcceptPathInfo On - <Directory "/var/www/app/htdocs"> - AuthType Basic - AuthName "private area" - AuthUserFile /etc/apache2/davical.htpasswd - Require valid-user - </Directory> + SetEnvIf X-Forwarded-User (.*) REMOTE_USER=$1 <Directory "/var/www/app/htdocs/images/"> AllowOverride None diff --git a/files/usr/local/bin/entrypoint.sh b/files/usr/local/bin/entrypoint.sh index 337e62a..1a95506 100755 --- a/files/usr/local/bin/entrypoint.sh +++ b/files/usr/local/bin/entrypoint.sh @@ -1,14 +1,12 @@ #!/bin/sh # Change apache config -#sed -i "s/#ServerName www.example.com:80/ServerName $APACHE_SERVER_NAME/" /etc/apache2/httpd.conf +sed -i "s/#ServerName www.example.com:80/ServerName $APACHE_SERVER_NAME/" /etc/apache2/httpd.conf sed -i "s/ServerAdmin\ you@example.com/ServerAdmin\ $ADMIN_MAIL/" /etc/apache2/httpd.conf sed -i 's/ServerSignature On/ServerSignature Off/' /etc/apache2/httpd.conf sed -i 's#/var/www/localhost/htdocs#/var/www/app/htdocs#g' /etc/apache2/httpd.conf sed -i "s/#APACHE_SERVER_NAME/$APACHE_SERVER_NAME/" /etc/apache2/conf.d/davical.conf -echo -e "$APACHE_USERS" > /etc/apache2/davical.htpasswd - # Modify php.ini settings sed -i 's/memory_limit = .*/memory_limit = 256M/' /etc/php7/php.ini sed -i "s/^;date.timezone =$/date.timezone = \"Europe\/Oslo\"/" /etc/php7/php.ini diff --git a/files/var/www/app/dba/pre_upgrade_install.sh b/files/var/www/app/dba/pre_upgrade_install.sh new file mode 100755 index 0000000..e75c7cd --- /dev/null +++ b/files/var/www/app/dba/pre_upgrade_install.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# These packages are needed to upgrade the database + +apk update && apk add \ + perl \ + perl-dbd-pg \ + perl-yaml \ + perl-dbi \ + postgresql-client |