Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bin/docker-compose
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@ if [[ "$PWD" == *"docker-stack"* || "$PWD" == *"htdocs"* ]]; then
else
${REAL_DOCKER_COMPOSE_CMD} ${BASH_ARGVS[*]};
fi

4 changes: 2 additions & 2 deletions docker/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ RUN usermod -u $USERID nginx
RUN groupmod -o -g $GROUPID nginx

ADD nginx.conf /etc/nginx/nginx.conf
ADD default.conf /etc/nginx/conf.d/default.conf
ADD default-dev.conf /etc/nginx/conf.d/default.conf
ADD m-hosts.conf /etc/nginx/conf.d/z-m-hosts.conf
ADD m-servers.conf /etc/nginx/conf.d/z-m-servers.conf
ADD m-servers-dev.conf /etc/nginx/conf.d/z-m-servers.conf
ADD m-certs.conf /etc/nginx/conf.d/z-m-certs.conf

# SSL
Expand Down
22 changes: 22 additions & 0 deletions docker/nginx/Dockerfile-prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM nginx:1.25
ARG USERID=1000
ARG GROUPID=1000
RUN groupmod -g 999 dialout

# fix www-data user to avoid permissions issues
RUN usermod -u $USERID nginx
RUN groupmod -o -g $GROUPID nginx

ADD nginx.conf /etc/nginx/nginx.conf
ADD default-prod.conf /etc/nginx/conf.d/default.conf
ADD m-hosts.conf /etc/nginx/conf.d/z-m-hosts.conf
ADD m-servers-prod.conf /etc/nginx/conf.d/z-m-servers.conf
ADD m-certs.conf /etc/nginx/conf.d/z-m-certs.conf

# SSL
ADD certs/* /etc/ssl/certs/
ADD certs/* /etc/ssl/private/
RUN whoami
RUN chown -R -f nginx: /etc/ssl /var/cache/nginx /var/log/nginx /var/run /var/run/*

EXPOSE 443
36 changes: 36 additions & 0 deletions docker/nginx/default-dev.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
server {
listen 80;
server_name _;

access_log /var/log/nginx/default.access.log main;

location / {
root /var/www/htdocs/;
index index.html index.htm index.php;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

# pass the PHP scripts to FastCGI server
#
location ~ \.php$ {
set $php_host ${PHP_HOSTM2};
fastcgi_pass ${php_host}:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
location ~ /\.ht {
deny all;
}
}

36 changes: 36 additions & 0 deletions docker/nginx/default-prod.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
server {
listen 8080;
server_name _;

access_log /var/log/nginx/default.access.log main;

location / {
root /var/www/htdocs/;
index index.html index.htm index.php;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

# pass the PHP scripts to FastCGI server
#
location ~ \.php$ {
set $php_host ${PHP_HOSTM2};
fastcgi_pass ${php_host}:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
location ~ /\.ht {
deny all;
}
}

2 changes: 1 addition & 1 deletion docker/nginx/default.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen 80;
listen 8080;
server_name _;

access_log /var/log/nginx/default.access.log main;
Expand Down
Loading