add(): custom flarum vhost (#29)
parent
8023c2b1f6
commit
305636eae7
|
@ -50,6 +50,6 @@ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.8/community" >> /etc/a
|
|||
|
||||
COPY rootfs /
|
||||
RUN chmod +x /usr/local/bin/* /services/*/run /services/.s6-svscan/*
|
||||
VOLUME /flarum/app/assets /flarum/app/extensions
|
||||
VOLUME /flarum/app/assets /flarum/app/extensions /etc/nginx/conf.d
|
||||
EXPOSE 8888
|
||||
CMD ["run.sh"]
|
||||
|
|
11
README.md
11
README.md
|
@ -4,7 +4,7 @@
|
|||
|
||||
### What is this ?
|
||||
|
||||
Flarum is the next-generation forum software that makes online discussion fun. It's simple, fast, and free. http://flarum.org/
|
||||
Simple forum software for building great communities. http://flarum.org/
|
||||
|
||||
### Features
|
||||
|
||||
|
@ -26,6 +26,7 @@ Flarum is the next-generation forum software that makes online discussion fun. I
|
|||
|
||||
- **/flarum/app/assets** : Flarum assets directory
|
||||
- **/flarum/app/extensions** : Flarum extension directory
|
||||
- **/etc/nginx/conf.d** : Nginx location directory
|
||||
|
||||
### Environment variables
|
||||
|
||||
|
@ -72,6 +73,7 @@ services:
|
|||
volumes:
|
||||
- /mnt/docker/flarum/assets:/flarum/app/assets
|
||||
- /mnt/docker/flarum/extensions:/flarum/app/extensions
|
||||
- /mnt/docker/flarum/nginx:/etc/nginx/conf.d
|
||||
depends_on:
|
||||
- mariadb
|
||||
|
||||
|
@ -159,6 +161,11 @@ touch 403.html 404.html 500.html 503.html
|
|||
chown -R 991:991 /mnt/docker/flarum
|
||||
```
|
||||
|
||||
### Custom vhost flarum nginx
|
||||
|
||||
File to change the vhost flarum `/etc/nginx/conf.d/custom-vhost-flarum.conf`
|
||||
To use file custom-vhost-flarum.conf add volume `/etc/nginx/conf.d`
|
||||
|
||||
### Custom composer repositories
|
||||
|
||||
To use the composer repository system, add your repo name and json representation in `/mnt/docker/flarum/extensions/composer.repositories.txt` :
|
||||
|
@ -169,5 +176,3 @@ my_public_repo|{"type":"vcs","url":"https://github.com/my/repo"}
|
|||
```
|
||||
|
||||
https://getcomposer.org/doc/03-cli.md#modifying-repositories
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
# Example:
|
||||
|
||||
# fix for flagrow/sitemap (https://github.com/flagrow/sitemap)
|
||||
# location = /sitemap.xml {
|
||||
# try_files $uri $uri/ /index.php?$query_string;
|
||||
# }
|
|
@ -67,18 +67,15 @@ http {
|
|||
error_page 500 /500.html;
|
||||
error_page 503 /503.html;
|
||||
|
||||
location = /403.html { root /flarum/app/vendor/flarum/core/error; }
|
||||
location = /404.html { root /flarum/app/vendor/flarum/core/error; }
|
||||
location = /500.html { root /flarum/app/vendor/flarum/core/error; }
|
||||
location = /503.html { root /flarum/app/vendor/flarum/core/error; }
|
||||
location = /403.html { alias /flarum/app/vendor/flarum/core/error; }
|
||||
location = /404.html { alias /flarum/app/vendor/flarum/core/error; }
|
||||
location = /500.html { alias /flarum/app/vendor/flarum/core/error; }
|
||||
location = /503.html { alias /flarum/app/vendor/flarum/core/error; }
|
||||
|
||||
location / { try_files $uri $uri/ /index.php?$query_string; }
|
||||
location /api { try_files $uri $uri/ /api.php?$query_string; }
|
||||
location /admin { try_files $uri $uri/ /admin.php?$query_string; }
|
||||
|
||||
# fix for flagrow/sitemap (https://github.com/flagrow/sitemap)
|
||||
location = /sitemap.xml { try_files $uri $uri/ /index.php?$query_string; }
|
||||
|
||||
# Access path list
|
||||
# --------------------------------------
|
||||
location ~ /\. {
|
||||
|
@ -125,16 +122,18 @@ http {
|
|||
try_files $uri =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
fastcgi_index index.php;
|
||||
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_request_buffering off;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
fastcgi_param REMOTE_ADDR $http_x_real_ip;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/custom-flarum.conf
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue