From 426401d05db787ac1f5c751d61089c3e39c8494f Mon Sep 17 00:00:00 2001 From: selim13 Date: Mon, 6 Feb 2017 18:56:49 +0300 Subject: [PATCH] Use su-exec to run migrations under apache user --- 3.1-apache/Dockerfile | 3 ++- 3.1-apache/start.sh | 2 +- 3.2-apache/Dockerfile | 3 ++- 3.2-apache/start.sh | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/3.1-apache/Dockerfile b/3.1-apache/Dockerfile index 6735b2d..92f170f 100644 --- a/3.1-apache/Dockerfile +++ b/3.1-apache/Dockerfile @@ -19,7 +19,8 @@ RUN apk add --no-cache curl \ php5-xml \ php5-zlib \ php5-zip \ - php5-gd + php5-gd \ + su-exec ### phpBB ENV PHPBB_VERSION 3.1.10 diff --git a/3.1-apache/start.sh b/3.1-apache/start.sh index 0cdc72f..2203168 100755 --- a/3.1-apache/start.sh +++ b/3.1-apache/start.sh @@ -17,7 +17,7 @@ db_wait() { db_migrate() { if [[ "${PHPBB_DB_AUTOMIGRATE}" = "true" && "${PHPBB_INSTALL}" != "true" ]]; then echo "$(date) - applying migrations" - php bin/phpbbcli.php db:migrate + su-exec apache php bin/phpbbcli.php db:migrate fi } diff --git a/3.2-apache/Dockerfile b/3.2-apache/Dockerfile index ec93009..88a15e0 100644 --- a/3.2-apache/Dockerfile +++ b/3.2-apache/Dockerfile @@ -20,7 +20,8 @@ RUN apk add --no-cache curl \ php5-xml \ php5-zlib \ php5-zip \ - php5-gd + php5-gd \ + su-exec ### phpBB ENV PHPBB_VERSION 3.2.0 diff --git a/3.2-apache/start.sh b/3.2-apache/start.sh index 0cdc72f..2203168 100755 --- a/3.2-apache/start.sh +++ b/3.2-apache/start.sh @@ -17,7 +17,7 @@ db_wait() { db_migrate() { if [[ "${PHPBB_DB_AUTOMIGRATE}" = "true" && "${PHPBB_INSTALL}" != "true" ]]; then echo "$(date) - applying migrations" - php bin/phpbbcli.php db:migrate + su-exec apache php bin/phpbbcli.php db:migrate fi }