add a flag to disable the two very long chmod command
parent
9a18d8fedd
commit
61112e1021
|
@ -44,6 +44,8 @@ Flarum is the next-generation forum software that makes online discussion fun. I
|
||||||
| **PHP_MEMORY_LIMIT** | PHP memory limit | *optional* | 128M |
|
| **PHP_MEMORY_LIMIT** | PHP memory limit | *optional* | 128M |
|
||||||
| **OPCACHE_MEMORY_LIMIT** | OPcache memory size in megabytes | *optional* | 128
|
| **OPCACHE_MEMORY_LIMIT** | OPcache memory size in megabytes | *optional* | 128
|
||||||
| **LOG_TO_STDOUT** | Enable nginx and php error logs to stdout | *optional* | false
|
| **LOG_TO_STDOUT** | Enable nginx and php error logs to stdout | *optional* | false
|
||||||
|
| **DO_CHMOD** | Enable or Disable chmod of files to $UID:$GUID | *optional* | true
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ export DB_HOST
|
||||||
export DB_USER
|
export DB_USER
|
||||||
export DB_NAME
|
export DB_NAME
|
||||||
export DEBUG
|
export DEBUG
|
||||||
|
export DO_CHMOD
|
||||||
|
|
||||||
# Default values
|
# Default values
|
||||||
DB_HOST=${DB_HOST:-mariadb}
|
DB_HOST=${DB_HOST:-mariadb}
|
||||||
|
@ -12,6 +13,7 @@ DB_USER=${DB_USER:-flarum}
|
||||||
DB_NAME=${DB_NAME:-flarum}
|
DB_NAME=${DB_NAME:-flarum}
|
||||||
DEBUG=${DEBUG:-false}
|
DEBUG=${DEBUG:-false}
|
||||||
LOG_TO_STDOUT=${LOG_TO_STDOUT:-false}
|
LOG_TO_STDOUT=${LOG_TO_STDOUT:-false}
|
||||||
|
DO_CHMOD=${DO_CHMOD:-true}
|
||||||
|
|
||||||
# Required env variables
|
# Required env variables
|
||||||
if [ -z "$DB_PASS" ]; then
|
if [ -z "$DB_PASS" ]; then
|
||||||
|
@ -29,7 +31,9 @@ sed -i "s/<PHP_MEMORY_LIMIT>/$PHP_MEMORY_LIMIT/g" /etc/php7/php-fpm.conf
|
||||||
sed -i "s/<OPCACHE_MEMORY_LIMIT>/$OPCACHE_MEMORY_LIMIT/g" /etc/php7/conf.d/00_opcache.ini
|
sed -i "s/<OPCACHE_MEMORY_LIMIT>/$OPCACHE_MEMORY_LIMIT/g" /etc/php7/conf.d/00_opcache.ini
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
|
if [ "$DO_CHMOD" = true ]; then
|
||||||
chown -R $UID:$GID /flarum /services /var/log /var/lib/nginx
|
chown -R $UID:$GID /flarum /services /var/log /var/lib/nginx
|
||||||
|
fi
|
||||||
|
|
||||||
cd /flarum/app
|
cd /flarum/app
|
||||||
|
|
||||||
|
@ -105,7 +109,9 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
|
if [ "$DO_CHMOD" = true ]; then
|
||||||
chown -R $UID:$GID /flarum
|
chown -R $UID:$GID /flarum
|
||||||
|
fi
|
||||||
|
|
||||||
# RUN !
|
# RUN !
|
||||||
exec su-exec $UID:$GID /bin/s6-svscan /services
|
exec su-exec $UID:$GID /bin/s6-svscan /services
|
||||||
|
|
Loading…
Reference in New Issue