diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cc616c8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM debian:bullseye-slim +RUN apt-get update && apt install --no-install-recommends -y php-fpm nginx fusiondirectory fusiondirectory-plugin-mail +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 +COPY start.sh /root/start.sh +RUN chmod +x /root/start.sh +EXPOSE 80 +CMD /root/start.sh diff --git a/fusiondirectory.conf b/fusiondirectory.conf new file mode 100644 index 0000000..46378f2 --- /dev/null +++ b/fusiondirectory.conf @@ -0,0 +1,41 @@ +{""} + + +
+ + + + + +
+
diff --git a/nginx-fusiondirectory.conf b/nginx-fusiondirectory.conf new file mode 100644 index 0000000..936acf0 --- /dev/null +++ b/nginx-fusiondirectory.conf @@ -0,0 +1,25 @@ +server { + listen 80; + listen [::]:80; + + root /usr/share/fusiondirectory/html; + index index.php; + + server_name _; + + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + # pass PHP scripts to FastCGI server + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; + } + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files $uri $uri/ =404; + } +} + diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..975a6d7 --- /dev/null +++ b/start.sh @@ -0,0 +1,4 @@ +#!/bin/bash +php-fpm7.4 +nginx -g 'daemon off;' +