bonjour mon site est dans le nom de domaine j'ai configuré nginx supervisor et gunicorn est ce qu'il y a d'autres étapes pour être indexé ou pas
Version imprimable
bonjour mon site est dans le nom de domaine j'ai configuré nginx supervisor et gunicorn est ce qu'il y a d'autres étapes pour être indexé ou pas
Selon moi j'ai fait tout correctement pourtant quand je mets le débug False j'ai une erreur 505:
j'ai essayé de vider la base, ça fonctionne. Déploiement avec débug True, non
les fichiers indispensables sont là ctd requirements.txt, runtime.txt, Procfile
settings.py:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 if os.environ.get('ENV') == 'PRODUCTION': DEBUG = False ALLOWED_HOSTS = ['xxx.herokuapp.com'] else: DEBUG = True ALLOWED_HOSTS = [] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', "whitenoise.middleware.WhiteNoiseMiddleware", STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') STATIC_URL = '/static/' MEDIA_URL = '/media/' STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] MEDIA_ROOT = os.path.join(BASE_DIR, 'media') DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' if os.environ.get('ENV') == 'PRODUCTION': # Static files settings STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') STATIC_URL = '/static/' MEDIA_URL = '/media/' STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] MEDIA_ROOT = os.path.join(BASE_DIR, 'media') STATICFILES_STORAGE = "whitenoise.storage.CompressedStaticFilesStorage" db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env) django_heroku.settings(locals()) ]