feat(): improve nginx config close #84
parent
e7e4db882f
commit
3b8ab7a74f
|
@ -1,3 +1,4 @@
|
|||
docker-compose.yml
|
||||
docker
|
||||
flarum.env
|
||||
test.sh
|
||||
|
|
10
README.md
10
README.md
|
@ -202,6 +202,16 @@ docker exec -ti flarum extension list
|
|||
|
||||
File to change the vhost flarum `/etc/nginx/flarum/custom-vhost-flarum.conf`
|
||||
To use file custom-vhost-flarum.conf add volume `/etc/nginx/flarum`
|
||||
Create file in `/mnt/docker/flarum/nginx/custom-vhost-flarum.conf`
|
||||
|
||||
```nginx
|
||||
# Example of custom vhost flarum for nginx
|
||||
# fix nginx issue for fof/sitemap (https://github.com/FriendsOfFlarum/sitemap)
|
||||
|
||||
location = /sitemap.xml {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
```
|
||||
|
||||
### Custom composer repositories
|
||||
|
||||
|
|
|
@ -57,6 +57,8 @@ http {
|
|||
fastcgi_param REMOTE_ADDR $http_x_real_ip;
|
||||
}
|
||||
|
||||
if (-f /etc/nginx/flarum/custom-vhost-flarum.conf) {
|
||||
include /etc/nginx/flarum/custom-vhost-flarum.conf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,15 +65,6 @@ if [ -f '/flarum/app/extensions/composer.repositories.txt' ]; then
|
|||
done < /flarum/app/extensions/composer.repositories.txt
|
||||
fi
|
||||
|
||||
# Custom vhost flarum nginx
|
||||
if [ ! -e '/etc/nginx/flarum/custom-vhost-flarum.conf' ]; then
|
||||
echo '# Example:
|
||||
# fix for flagrow/sitemap (https://github.com/flagrow/sitemap)
|
||||
# location = /sitemap.xml {
|
||||
# try_files $uri $uri/ /index.php?$query_string;
|
||||
# }' > /etc/nginx/flarum/custom-vhost-flarum.conf
|
||||
fi
|
||||
|
||||
# if installation was performed before
|
||||
if [ -e '/flarum/app/public/assets/rev-manifest.json' ] || [ -e '/flarum/app/public/assets/._flarum-installed.lock' ] ; then
|
||||
echo "[INFO] Flarum already installed, init app..."
|
||||
|
@ -127,8 +118,9 @@ else
|
|||
-e "s|<FLARUM_TITLE>|${FLARUM_TITLE}|g" /flarum/app/config.yml
|
||||
|
||||
# Install flarum
|
||||
su-exec "${UID}:${GID}" php /flarum/app/flarum install --file=/flarum/app/config.yml &&
|
||||
touch /flarum/app/public/assets/._flarum-installed.lock
|
||||
su-exec "${UID}:${GID}" php /flarum/app/flarum install --file=/flarum/app/config.yml \
|
||||
&& touch /flarum/app/public/assets/._flarum-installed.lock
|
||||
|
||||
echo "[INFO] End of flarum installation"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue