Made FLARUM_PUBLIC_PATH a configurable variable
parent
1fc1fc9d2e
commit
d5b7e197d4
rootfs
etc/nginx
usr/local/bin
|
@ -18,7 +18,8 @@ ENV GID=991 \
|
|||
DEBUG=false \
|
||||
LOG_TO_STDOUT=false \
|
||||
GITHUB_TOKEN_AUTH=false \
|
||||
FLARUM_PORT=8888
|
||||
FLARUM_PORT=8888 \
|
||||
FLARUM_PUBLIC_PATH=/public
|
||||
|
||||
RUN apk add --no-progress --no-cache \
|
||||
nginx \
|
||||
|
|
|
@ -56,7 +56,7 @@ http {
|
|||
listen <FLARUM_PORT>;
|
||||
charset utf-8;
|
||||
|
||||
root /flarum/app/public;
|
||||
root /flarum/app<FLARUM_PUBLIC_PATH>;
|
||||
index index.php;
|
||||
|
||||
client_max_body_size <UPLOAD_MAX_SIZE>;
|
||||
|
|
|
@ -13,6 +13,7 @@ fi
|
|||
|
||||
# Set file config for nginx and php
|
||||
sed -i "s/<FLARUM_PORT>/${FLARUM_PORT}/g" /etc/nginx/nginx.conf
|
||||
sed -i "s/<FLARUM_PORT>/${FLARUM_PUBLIC_PATH}/g" /etc/nginx/nginx.conf
|
||||
sed -i "s/<UPLOAD_MAX_SIZE>/${UPLOAD_MAX_SIZE}/g" /etc/nginx/nginx.conf /etc/php7/php-fpm.conf
|
||||
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
|
||||
|
@ -59,7 +60,7 @@ if [ ! -e '/etc/nginx/conf.d/custom-vhost-flarum.conf' ]; then
|
|||
fi
|
||||
|
||||
# if installation was performed before
|
||||
if [ -e '/flarum/app/public/assets/rev-manifest.json' ]; then
|
||||
if [ -e "/flarum/app${FLARUM_PUBLIC_PATH}/assets/rev-manifest.json" ]; then
|
||||
echo "[INFO] Flarum already installed, init app..."
|
||||
|
||||
sed -i -e "s|<DEBUG>|${DEBUG}|g" \
|
||||
|
|
Loading…
Reference in New Issue