feat(): add PHP_EXTENSION env to install php extension
parent
cd55564193
commit
052b6cc755
21
README.md
21
README.md
|
@ -55,6 +55,7 @@
|
||||||
| **OPCACHE_MEMORY_LIMIT** | OPcache memory size in megabytes | *optional* | 128
|
| **OPCACHE_MEMORY_LIMIT** | OPcache memory size in megabytes | *optional* | 128
|
||||||
| **LOG_TO_STDOUT** | Enable nginx and php error logs to stdout | *optional* | false
|
| **LOG_TO_STDOUT** | Enable nginx and php error logs to stdout | *optional* | false
|
||||||
| **GITHUB_TOKEN_AUTH** | Github token to download private extensions | *optional* | false
|
| **GITHUB_TOKEN_AUTH** | Github token to download private extensions | *optional* | false
|
||||||
|
| **PHP_EXTENSIONS** | Install additional php extensions | *optional* | none
|
||||||
|
|
||||||
### Required environment variable for first installation
|
### Required environment variable for first installation
|
||||||
|
|
||||||
|
@ -148,6 +149,26 @@ docker-compose up -d flarum
|
||||||
|
|
||||||
![flarum-home](http://i.imgur.com/6kH9iTV.png)
|
![flarum-home](http://i.imgur.com/6kH9iTV.png)
|
||||||
|
|
||||||
|
### Install additional php extensions
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
flarum:
|
||||||
|
image: mondedie/flarum:stable
|
||||||
|
container_name: flarum
|
||||||
|
environment:
|
||||||
|
- PHP_EXTENSIONS="gmp session brotli"
|
||||||
|
volumes:
|
||||||
|
- /mnt/docker/flarum/assets:/flarum/app/public/assets
|
||||||
|
- /mnt/docker/flarum/extensions:/flarum/app/extensions
|
||||||
|
- /mnt/docker/flarum/nginx:/etc/nginx/conf.d
|
||||||
|
```
|
||||||
|
|
||||||
|
This example install php7-gmp php7-session and php7-brotli with apk
|
||||||
|
You can find a php extension here https://pkgs.alpinelinux.org/packages?name=php7-*&branch=v3.12&arch=x86_64
|
||||||
|
|
||||||
### Install custom extensions
|
### Install custom extensions
|
||||||
|
|
||||||
**Flarum extensions list :** https://flagrow.io/extensions
|
**Flarum extensions list :** https://flagrow.io/extensions
|
||||||
|
|
|
@ -31,6 +31,15 @@ if [ "${LOG_TO_STDOUT}" = true ]; then
|
||||||
sed -i "s/.*error_log.*$/error_log = \/dev\/stdout/" /etc/php7/php-fpm.conf
|
sed -i "s/.*error_log.*$/error_log = \/dev\/stdout/" /etc/php7/php-fpm.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Install additional php extensions
|
||||||
|
if [ -n "${PHP_EXTENSIONS}" ]; then
|
||||||
|
for extension in ${PHP_EXTENSIONS}; do
|
||||||
|
PACKAGES="php7-${extension} ${PACKAGES}"
|
||||||
|
done
|
||||||
|
|
||||||
|
apk add --no-progress --no-cache ${PACKAGES}
|
||||||
|
fi
|
||||||
|
|
||||||
cd /flarum/app
|
cd /flarum/app
|
||||||
|
|
||||||
# add github token authentication (eg. for privates extensions)
|
# add github token authentication (eg. for privates extensions)
|
||||||
|
|
Loading…
Reference in New Issue