From dec8e3626a59daf9141206df53cbf793fbe440ff Mon Sep 17 00:00:00 2001 From: flifloo Date: Tue, 18 Apr 2023 20:13:53 +0200 Subject: [PATCH] Add plugins support --- Dockerfile | 2 +- README.md | 6 ++++++ start.sh | 11 ++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc616c8..32b0847 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM debian:bullseye-slim -RUN apt-get update && apt install --no-install-recommends -y php-fpm nginx fusiondirectory fusiondirectory-plugin-mail +RUN apt-get update && apt-get install --no-install-recommends -y php-fpm nginx fusiondirectory RUN mkdir /run/php && rm /etc/nginx/sites-enabled/default /etc/nginx/sites-available/default COPY nginx-fusiondirectory.conf /etc/nginx/conf.d/fusiondirectory.conf COPY fusiondirectory.conf /usr/share/doc/fusiondirectory/fusiondirectory.conf diff --git a/README.md b/README.md index d072a1a..3f60dcd 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,9 @@ docker exec -it fusiondirectory fusiondirectory-setup --check-config ``` Now you can press next, you will be redirected to the login page. You can use the FusionDirectory's admin user credentials created earlier to login. + +## Environment variables + +| Variable | Value | +|:-------------------:|:------------------------------------------------------------------------------------:| +| `FD_PLUGINS` | Space separated list of plugins name | diff --git a/start.sh b/start.sh index 975a6d7..fd6004e 100644 --- a/start.sh +++ b/start.sh @@ -1,4 +1,13 @@ #!/bin/bash + +if [ -n "$FD_PLUGINS" ]; then + apt-get update + plugins=() + for plugin in $FD_PLUGINS; do + plugins+=("fusiondirectory-plugin-$plugin") + done + apt-get install -yy "${plugins[@]}" +fi + php-fpm7.4 nginx -g 'daemon off;' -