File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,5 +136,5 @@ dmypy.json
136136
137137cache
138138
139- static
139+ nginx / static
140140/emails /
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ FROM nginx:1.21-alpine
22
33RUN rm /etc/nginx/conf.d/default.conf
44COPY ./nginx.conf /etc/nginx/conf.d/default.conf
5+ COPY ./static /procollab/static
Original file line number Diff line number Diff line change @@ -26,4 +26,9 @@ server {
2626 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
2727 proxy_set_header X-Forwarded-Host $server_name ;
2828 }
29+
30+ location /static/ {
31+ alias /procollab/static/; # Укажите путь к вашим статическим файлам здесь
32+ }
33+
2934}
Original file line number Diff line number Diff line change 11from pathlib import Path
22from decouple import config
33
4+ import mimetypes
5+
6+ mimetypes .add_type ("application/javascript" , ".js" , True )
7+ mimetypes .add_type ("text/css" , ".css" , True )
8+ mimetypes .add_type ("text/html" , ".html" , True )
9+
10+
411BASE_DIR = Path (__file__ ).resolve ().parent .parent
512
613SECRET_KEY = config ("DJANGO_SECRET_KEY" , cast = str )
714
815DEBUG = config ("DEBUG" , default = False , cast = bool )
916
1017ALLOWED_HOSTS = [
18+ "127.0.0.1:8001" ,
1119 "127.0.0.1:8000" ,
1220 "127.0.0.1" ,
1321 "localhost" ,
3139 "https://dev.procollab.ru" ,
3240]
3341
42+ CORS_ALLOW_ALL_ORIGINS = True
43+
3444INSTALLED_APPS = [
3545 "django.contrib.admin" ,
3646 "django.contrib.auth" ,
124134 },
125135]
126136
127- LANGUAGE_CODE = "en-us "
137+ LANGUAGE_CODE = "ru-ru "
128138
129- TIME_ZONE = "UTC "
139+ TIME_ZONE = "Europe/Moscow "
130140
131141USE_I18N = True
132142
133143USE_TZ = True
134144
135145STATIC_URL = "/static/"
136- STATIC_ROOT = BASE_DIR / "static"
146+ STATIC_ROOT = BASE_DIR / "nginx/ static"
137147
138148STATICFILES_STORAGE = "whitenoise.storage.CompressedStaticFilesStorage"
139149
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments