Added support for HTTP/2 to the docker image
This commit is contained in:
parent
e5a3357f2f
commit
ad635d339c
2 changed files with 16 additions and 4 deletions
|
@ -2,6 +2,12 @@ FROM nginx
|
|||
|
||||
MAINTAINER maintainers@vikunja.io
|
||||
|
||||
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
|
||||
|
||||
ADD nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
COPY dist /usr/share/nginx/html
|
||||
RUN rm /usr/share/nginx/html/js/*.map
|
|
@ -38,7 +38,13 @@ http {
|
|||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
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 _;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/dummy.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/dummy.key;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
|
|
Loading…
Reference in a new issue