From e5e43017230c58ee1d1d9ad6df553262315ce825 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 13 Nov 2021 17:28:56 +0100 Subject: [PATCH] feat: remove ssl generation from docker image (cherry-picked from 73651ef964af57e717d6449fb7d5937028539c58) --- Dockerfile | 6 ------ nginx.conf | 7 ++++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index d73a4fe8..159930f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,12 +24,6 @@ RUN \ # Stage 2: copy FROM nginx -RUN apt-get update && apt-get install -y apt-utils openssl && \ - mkdir -p /etc/nginx/ssl && \ - openssl genrsa -out /etc/nginx/ssl/dummy.key 2048 && \ - openssl req -new -key /etc/nginx/ssl/dummy.key -out /etc/nginx/ssl/dummy.csr -subj "/C=DE/L=Berlin/O=Vikunja/CN=Vikunja Snakeoil" && \ - openssl x509 -req -days 3650 -in /etc/nginx/ssl/dummy.csr -signkey /etc/nginx/ssl/dummy.key -out /etc/nginx/ssl/dummy.crt - COPY nginx.conf /etc/nginx/nginx.conf COPY run.sh /run.sh diff --git a/nginx.conf b/nginx.conf index 1b3d0e4f..8d0de81e 100644 --- a/nginx.conf +++ b/nginx.conf @@ -60,14 +60,15 @@ http { server { listen 80; listen 81 default_server http2 proxy_protocol; ## Needed when behind HAProxy with SSL termination + HTTP/2 support - listen 443 default_server ssl http2; server_name _; expires $expires; - ssl_certificate /etc/nginx/ssl/dummy.crt; - ssl_certificate_key /etc/nginx/ssl/dummy.key; + location ~* .(txt|webmanifest|css|js|mjs|map|svg|jpg|jpeg|png|ico|ttf|woff|woff2|wav)$ { + root /usr/share/nginx/html; + try_files $uri $uri/ =404; + } location / { root /usr/share/nginx/html;