Add working Dockerfile and various configs

This commit is contained in:
2020-12-06 11:55:59 +01:00
parent 7f53165704
commit 79d4af32ac
9 changed files with 178 additions and 21 deletions

View File

@ -1,38 +1,38 @@
server {
server_name ftracker.fasttube.de;
server_name ftracker.fasttube.de;
listen 443 ssl;
listen 443 ssl;
root /root/ftracker/web;
root /root/ftracker/web;
index index.html index.htm;
index index.html index.htm;
location / {
# First attempt to serve request as file
# If no such file, show index to allow for client side routing
try_files $uri $uri/ $uri.html @api;
location / {
# First attempt to serve request as file
# If no such file, pass to backend
try_files $uri $uri/ $uri.html @api;
}
location @api {
include uwsgi_params;
# Pass it to the uwsgi server
uwsgi_pass unix:///tmp/ftracker.sock;
}
include uwsgi_params;
# Pass it to the uwsgi server
uwsgi_pass unix:///tmp/ftracker.sock;
}
# RIP
add_header X-Clacks-Overhead "GNU Terry Pratchett" always;
# RIP
add_header X-Clacks-Overhead "GNU Terry Pratchett" always;
ssl_certificate /usr/local/etc/letsencrypt/live/ftracker.fasttube.de/fullchain.pem;
ssl_certificate_key /usr/local/etc/letsencrypt/live/ftracker.fasttube.de/privkey.pem;
ssl_certificate /usr/local/etc/letsencrypt/live/ftracker.fasttube.de/fullchain.pem;
ssl_certificate_key /usr/local/etc/letsencrypt/live/ftracker.fasttube.de/privkey.pem;
}
server {
server_name ftracker.fasttube.de;
server_name ftracker.fasttube.de;
listen 80;
listen 80;
# 308 instead of 301 to prohibit method change on redirect
# (some clients change POST to GET on 301, 308 does not allow that)
return 308 https://$host$request_uri;
# 308 instead of 301 to prohibit method change on redirect
# (some clients change POST to GET on 301, 308 does not allow that)
return 308 https://$host$request_uri;
}