Add docker files
This commit is contained in:
parent
0d9a4299bd
commit
0c84d1cfe2
4 changed files with 79 additions and 0 deletions
9
Dockerfile
Normal file
9
Dockerfile
Normal file
|
@ -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
|
41
fusiondirectory.conf
Normal file
41
fusiondirectory.conf
Normal file
|
@ -0,0 +1,41 @@
|
|||
{"<?"}{literal}xml version="1.0"{/literal}{"?>"}
|
||||
<conf>
|
||||
<!-- Main section **********************************************************
|
||||
The main section defines global settings, which might be overridden by
|
||||
each location definition inside.
|
||||
|
||||
For more information about the configuration parameters, take a look at
|
||||
the FusionDirectory.conf(5) manual page.
|
||||
-->
|
||||
<main default="{$cv.location}"
|
||||
{if $cv.fdLogging}
|
||||
logging="TRUE"
|
||||
{else}
|
||||
logging="FALSE"
|
||||
{/if}
|
||||
{if $cv.fdDisplayErrors}
|
||||
displayErrors="TRUE"
|
||||
{else}
|
||||
displayErrors="FALSE"
|
||||
{/if}
|
||||
{if $cv.fdForceSSL}
|
||||
forceSSL="TRUE"
|
||||
{else}
|
||||
forceSSL="FALSE"
|
||||
{/if}
|
||||
templateCompileDirectory="{$templateCompileDirectory}"
|
||||
debugLevel="{$cv.debugLevel}"
|
||||
>
|
||||
|
||||
<!-- Location definition -->
|
||||
<location name="{$cv.location}"
|
||||
{if $cv.tls}
|
||||
ldapTLS="TRUE"
|
||||
{/if}
|
||||
>
|
||||
<referral URI="{$cv.connection}" base="{$cv.base}"
|
||||
adminDn="{$cv.admin}"
|
||||
adminPassword="{$cv.password}" />
|
||||
</location>
|
||||
</main>
|
||||
</conf>
|
25
nginx-fusiondirectory.conf
Normal file
25
nginx-fusiondirectory.conf
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
4
start.sh
Normal file
4
start.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
php-fpm7.4
|
||||
nginx -g 'daemon off;'
|
||||
|
Loading…
Reference in a new issue