Use su-exec to run migrations under apache user

This commit is contained in:
selim13
2017-02-06 18:56:49 +03:00
parent 5503ccce5d
commit 426401d05d
4 changed files with 6 additions and 4 deletions

View File

@@ -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

View File

@@ -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
}

View File

@@ -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

View File

@@ -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
}