Fix #358: dockerized nginx to make deployment easier
This commit is contained in:
parent
6940d411d7
commit
0740cc33e5
11 changed files with 373 additions and 41 deletions
36
deploy/docker.proxy.template
Normal file
36
deploy/docker.proxy.template
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
upstream fw {
|
||||
# depending on your setup, you may want to udpate this
|
||||
server ${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT};
|
||||
}
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name ${FUNKWHALE_HOSTNAME};
|
||||
location / { return 301 https://$host$request_uri; }
|
||||
}
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name ${FUNKWHALE_HOSTNAME};
|
||||
|
||||
# TLS
|
||||
ssl_protocols TLSv1.2;
|
||||
ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_certificate /etc/letsencrypt/live/${FUNKWHALE_HOSTNAME}/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/${FUNKWHALE_HOSTNAME}/privkey.pem;
|
||||
|
||||
# HSTS
|
||||
add_header Strict-Transport-Security "max-age=31536000";
|
||||
|
||||
location / {
|
||||
include /etc/nginx/funkwhale_proxy.conf;
|
||||
proxy_pass http://fw/;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue