Stage to Vultr

This commit is contained in:
Ruidy Nemausat 2020-01-02 17:13:18 +01:00
parent 6162d87fe0
commit 1793ea0d8b
5 changed files with 33 additions and 7 deletions

3
.gitignore vendored
View file

@ -10,4 +10,5 @@ villafleurie/static_files/
rental/client_secrets.json
token.pickle
*.env
*.tar
*.tar
debug.log

View file

@ -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

View file

@ -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;
}
}

View file

@ -8,7 +8,7 @@
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="" name="keywords" />
<meta content="" name="description" />
<link href="{% static 'rental/img/favicon.png' %}" rel="icon" />
<link href="{% static 'rental/img/apple-touch-icon.png' %}" rel="icon" />
<link
href="{% static 'rental/img/apple-touch-icon.png' %}"
rel="apple-touch-icon"

View file

@ -21,13 +21,31 @@ if os.environ.get('ENV') == 'PRODUCTION':
'ATOMIC_REQUESTS': True
}
}
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS')
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
# STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')
CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True
CONN_MAX_AGE = 500
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': os.path.join(BASE_DIR, "debug.log")
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'DEBUG',
'propagate': True,
},
},
}
else:
DEBUG = True
DATABASES = {
@ -47,7 +65,6 @@ else:
STATICFILES_DIRS = [os.path.join(BASE_DIR, "rental", "static", "rental"), ]
ALLOWED_HOSTS = [
'0.0.0.0',
'127.0.0.1',
'localhost'
]