Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117974650
D2758.1775514316.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D2758.1775514316.diff
View Options
diff --git a/docker-compose.yml b/docker-compose.yml
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -107,7 +107,7 @@
build:
context: ./docker/nginx/
args:
- NGINX_AUTH_WEBHOOK: ${APP_DOMAIN}/api/webhooks/nginx
+ NGINX_AUTH_HOST: services.${APP_DOMAIN}
container_name: kolab-nginx
hostname: nginx.hosted.com
image: kolab-nginx
diff --git a/docker/nginx/Dockerfile b/docker/nginx/Dockerfile
--- a/docker/nginx/Dockerfile
+++ b/docker/nginx/Dockerfile
@@ -1,54 +1,29 @@
-FROM fedora:31
+FROM fedora:34
MAINTAINER Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
ENV container docker
-ENV SYSTEMD_PAGER=''
-ARG NGINX_AUTH_WEBHOOK
+ARG NGINX_AUTH_HOST
RUN dnf -y install \
--setopt 'tsflags=nodocs' \
- bash-completion \
- bind-utils \
certbot \
- curl \
- dhcp-client \
- git \
- iproute \
- iptraf-ng \
- iputils \
- less \
- lsof \
- mtr \
- net-tools \
- NetworkManager \
- NetworkManager-tui \
- network-scripts \
nginx \
nginx-mod-mail \
- nmap-ncat \
- openssh-clients \
- openssh-server \
- procps-ng \
python3-certbot-nginx \
- strace \
- systemd-udev \
- tcpdump \
- telnet \
- traceroute \
- vim-enhanced \
- wget && \
+ vim-enhanced && \
dnf clean all
-RUN sed -i -r -e 's/^SELINUX=.*$/SELINUX=permissive/g' /etc/selinux/config 2>/dev/null || :
-
COPY nginx.conf /etc/nginx/nginx.conf
-RUN sed -i -r -e "s|^.*auth_http.*$| auth_http $NGINX_AUTH_WEBHOOK;|g" /etc/nginx/nginx.conf
+RUN sed -i -r -e "s|^.*auth_http_header.*$| auth_http_header Host $NGINX_AUTH_HOST;|g" /etc/nginx/nginx.conf
+
+# Forward request logs to Docker log collector
+RUN ln -sf /dev/stdout /var/log/nginx/access.log \
+ && ln -sf /dev/stderr /var/log/nginx/error.log
-RUN systemctl enable nginx
+STOPSIGNAL SIGTERM
-CMD ["/lib/systemd/systemd", "--system"]
-ENTRYPOINT "/lib/systemd/systemd"
+CMD ["nginx", "-g", "daemon off;"]
EXPOSE 110/tcp 143/tcp 993/tcp 995/tcp
diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf
--- a/docker/nginx/nginx.conf
+++ b/docker/nginx/nginx.conf
@@ -13,6 +13,7 @@
mail {
server_name imap.hosted.com;
auth_http 127.0.0.1:8000/api/webhooks/nginx;
+ auth_http_header Host localhost;
proxy_pass_error_message on;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 10:25 PM (3 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18836556
Default Alt Text
D2758.1775514316.diff (2 KB)
Attached To
Mode
D2758: Slimmed down nginx container
Attached
Detach File
Event Timeline