feat(): add support of custom composer file

pull/3/head
Hardware 2016-11-06 09:01:52 +01:00
parent 533b94ac0e
commit 74ce9dfb12
No known key found for this signature in database
GPG Key ID: EC6DF6F90263EDEA
2 changed files with 59 additions and 0 deletions

View File

@ -144,6 +144,59 @@ touch 403.html 404.html 500.html 503.html
chown -R 991:991 /mnt/docker/flarum 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 ### Screenshot
#### Installation #### Installation

6
run.sh
View File

@ -28,11 +28,17 @@ chown -R $UID:$GID /flarum /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /et
cd /flarum/app cd /flarum/app
# Custom HTTP errors pages
if [ -d 'assets/errors' ]; then if [ -d 'assets/errors' ]; then
rm -rf vendor/flarum/core/error/* rm -rf vendor/flarum/core/error/*
ln -s /flarum/app/assets/errors/* vendor/flarum/core/error ln -s /flarum/app/assets/errors/* vendor/flarum/core/error
fi 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 no installation was performed before
if [ -e 'assets/rev-manifest.json' ]; then if [ -e 'assets/rev-manifest.json' ]; then