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;