feat(): add support of custom composer file
parent
533b94ac0e
commit
74ce9dfb12
53
README.md
53
README.md
|
@ -144,6 +144,59 @@ touch 403.html 404.html 500.html 503.html
|
|||
chown -R 991:991 /mnt/docker/flarum
|
||||
```
|
||||
|
||||
### Custom composer.json (experienced users)
|
||||
|
||||
Customize your own composer.json file in `/mnt/docker/flarum/composer.custom.json`, for example add some privates repositories like this :
|
||||
|
||||
```json
|
||||
# /mnt/docker/flarum/composer.custom.json
|
||||
{
|
||||
"name": "flarum/flarum",
|
||||
"description": "Delightfully simple forum software.",
|
||||
[...]
|
||||
|
||||
"repositories": [
|
||||
{
|
||||
"type": "package",
|
||||
"package": {
|
||||
"name": "xxxxx/flarum-ext-my-private-extension",
|
||||
"version": "dev-master",
|
||||
"type": "flarum-extension",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Me",
|
||||
"email": "me@domain.tld"
|
||||
}
|
||||
],
|
||||
"dist": {
|
||||
"url": "/flarum/app/assets/extensions/flarum-ext-my-private-extension",
|
||||
"type": "path",
|
||||
"reference": "master"
|
||||
},
|
||||
"require": {
|
||||
"flarum/core": "^0.1.0-beta.6"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"xxx\\xxx\\": "src/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"flarum-extension": {
|
||||
"title": "xxxxxx",
|
||||
"icon": {
|
||||
"name": "picture-o",
|
||||
"backgroundColor": "#2196f3",
|
||||
"color": "#fff"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
### Screenshot
|
||||
|
||||
#### Installation
|
||||
|
|
6
run.sh
6
run.sh
|
@ -28,11 +28,17 @@ chown -R $UID:$GID /flarum /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /et
|
|||
|
||||
cd /flarum/app
|
||||
|
||||
# Custom HTTP errors pages
|
||||
if [ -d 'assets/errors' ]; then
|
||||
rm -rf vendor/flarum/core/error/*
|
||||
ln -s /flarum/app/assets/errors/* vendor/flarum/core/error
|
||||
fi
|
||||
|
||||
# Custom composer.json (eg. for privates extensions)
|
||||
if [ -f 'assets/composer.custom.json' ]; then
|
||||
cp -f assets/composer.custom.json composer.json
|
||||
fi
|
||||
|
||||
# if no installation was performed before
|
||||
if [ -e 'assets/rev-manifest.json' ]; then
|
||||
|
||||
|
|
Loading…
Reference in New Issue