Example Docker Architecture for deploying the Consulta Backend on Linux Server Environments
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

58 lines
1.2 KiB

events {
worker_connections 4096; ## Default: 1024
}
http {
include mime.types;
sendfile on;
upstream gunicorn_server {
server 172.16.238.11:8000;
}
# server {
# listen 80;
# return 301 https://$host$request_uri;
#}
server {
#listen 443 ssl;
listen 80;
# ssl_certificate /etc/letsencrypt/live/reinkober-it.de/cert.pem;
# ssl_certificate_key /etc/letsencrypt/live/reinkober-it.de/privkey.pem;
root /static;
keepalive_timeout 5;
server_name ~^(.+)$;
# checks for static file, if not found proxy to app
location / {
try_files $uri @proxy_to_app;
add_header X-Frame-Options DENY;
}
# simple reverse proxy
location @proxy_to_app {
proxy_pass http://gunicorn_server;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
# serve static files
#location ~ (images|javascript|js|css|flash|media|static)/ {
# root /var/www/reinkober-it/static/static;
# expires 30d;
#}
location /static {
alias /static;
}
location /media {
alias /media;
}
}
}