From 1793ea0d8be64d314bc6260f946e14aee3c8fe91 Mon Sep 17 00:00:00 2001 From: Ruidy Nemausat Date: Thu, 2 Jan 2020 17:13:18 +0100 Subject: [PATCH] Stage to Vultr --- .gitignore | 3 ++- README.md | 4 ++-- nginx/villafleurie.conf | 8 ++++++++ rental/templates/rental/base.html | 2 +- villafleurie/settings.py | 23 ++++++++++++++++++++--- 5 files changed, 33 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index f0a3a69..3d129f6 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ villafleurie/static_files/ rental/client_secrets.json token.pickle *.env -*.tar \ No newline at end of file +*.tar +debug.log \ No newline at end of file diff --git a/README.md b/README.md index 066cc7e..b1f0e8c 100644 --- a/README.md +++ b/README.md @@ -109,15 +109,15 @@ Le visiteur doit pouvoir : \_ nettoyer les statics files. Garder que les définitions utiles - Mixpanel et Google Analytics - Récrire les mentions légales -- configure nginx reverse-proxy to serve static/media files - Centrer Bouton "Reserver" page location - Ajouter un titre "Disponibilités" au dessus du calendrier - page réservation/services : égayer avec des petites photos … - Internationalisation -- Connect to domain name +- Push docker to Vultr. Connect to domain name - Système de facturation: CRUD Réservations et envoi. Automatisation si possible - Réservation page : Ajouter des photos. Renvoyer vers la page Location onClick sur Réserver TX. Proposer Upsells : navette + location voiture. - Vider le contenu du folder root ? +- Confirmation message contact envoyé ## BUGS diff --git a/nginx/villafleurie.conf b/nginx/villafleurie.conf index 2181713..94985ac 100644 --- a/nginx/villafleurie.conf +++ b/nginx/villafleurie.conf @@ -1,6 +1,7 @@ server { listen 80; server_name localhost; + server_tokens off; access_log /var/log/nginx/example.log; location /static/ { @@ -14,8 +15,15 @@ server { } location / { + try_files $uri $uri/ @villafleurie; + } + + location @villafleurie { proxy_pass http://web:8000; + proxy_pass_request_headers on; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_redirect off; } } \ No newline at end of file diff --git a/rental/templates/rental/base.html b/rental/templates/rental/base.html index 46cd606..e5fced0 100644 --- a/rental/templates/rental/base.html +++ b/rental/templates/rental/base.html @@ -8,7 +8,7 @@ - +