From e24eca7da0a8b49c22f2e650ce0cf918cf53d713 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 5 Oct 2020 14:22:37 -0700 Subject: [PATCH] Config files for prod deployment --- docker-compose.yml | 3 ++- nginx/default.conf | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6f9dbdc2a..d7c4ec3b9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: nginx: - build: ./nginx + image: nginx:latest ports: - 1333:80 depends_on: @@ -10,6 +10,7 @@ services: networks: - main volumes: + - ./nginx:/etc/nginx/conf.d - static_volume:/app/static - media_volume:/app/images db: diff --git a/nginx/default.conf b/nginx/default.conf index d38982870..396852e2e 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -20,3 +20,46 @@ server { alias /app/static/; } } + +# PROD version +# +#server { +# listen [::]:80; +# listen 80; +# +# server_name you-domain.com www.you-domain.com; +# +# location ~ /.well-known/acme-challenge { +# allow all; +# root /var/www/certbot; +# } +# +# # redirect http to https www +# return 301 https://www.you-domain.com$request_uri; +#} +# +#server { +# listen [::]:443 ssl http2; +# listen 443 ssl http2; +# +# server_name you-domain.com; +# +# # SSL code +# ssl_certificate /etc/nginx/ssl/live/you-domain.com/fullchain.pem; +# ssl_certificate_key /etc/nginx/ssl/live/you-domain.com/privkey.pem; +# +# location / { +# proxy_pass http://web; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header Host $host; +# proxy_redirect off; +# } +# +# location /images/ { +# alias /app/images/; +# } +# +# location /static/ { +# alias /app/static/; +# } +#}