2
0
mirror of https://github.com/offen/website.git synced 2024-12-23 05:20:21 +01:00

remove nginx from dev setup

this was a leftover from when an offen instance was running on the same
domain as the website. nginx is not needed as pelican can serve the
dev content for us just fine.
This commit is contained in:
Frederik Ring 2020-08-26 17:30:53 +02:00
parent b64d8ed944
commit 4c6b2ff2c5
2 changed files with 2 additions and 54 deletions

View File

@ -1,16 +1,9 @@
version: '3'
services:
proxy:
image: nginx:1.17-alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 8000:80
depends_on:
- homepage
homepage:
ports:
- 8000:8000
build:
context: '.'
dockerfile: ./Dockerfile.python

View File

@ -1,45 +0,0 @@
events {}
http {
include mime.types;
upstream homepage {
server homepage:8000;
}
map $request_uri $expires {
default off;
"~-[0-9a-z]{10}\.js$" 1d;
"~*(woff|woff2|ttf|eot)$" 1d;
}
map $sent_http_content_type $csp {
default "";
"~^text/html" "default-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'";
}
server {
listen 80;
expires $expires;
add_header Content-Security-Policy $csp;
add_header Strict-Transport-Security 'max-age=604800; includeSubDomains';
add_header Referrer-Policy 'origin-when-cross-origin';
add_header X-Content-Type-Options 'nosniff';
add_header X-XSS-Protection '1; mode=block';
location / {
proxy_pass http://homepage;
proxy_redirect off;
}
error_page 404 /custom_404.html;
# in development, this handles empty responses by the pelican dev server which are 404s in the end
error_page 502 /custom_404.html;
location = /custom_404.html {
internal;
proxy_pass http://homepage/404.html;
proxy_redirect off;
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive" always;
}
}
}