v0.0.3
This commit is contained in:
parent
19bdf80a04
commit
906082577c
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,6 @@
|
||||
.env
|
||||
__pycache__
|
||||
venv
|
||||
venv
|
||||
--cached
|
||||
media
|
||||
web/logs
|
||||
@ -8,7 +8,7 @@ services:
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./media:/app/media
|
||||
- ./static:/app/staticfiles
|
||||
- ./web/staticfiles:/app/web/staticfiles
|
||||
# - ./media:/app/media
|
||||
ports:
|
||||
- "8000:8000"
|
||||
|
||||
@ -7,14 +7,11 @@ services:
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./media:/app/media
|
||||
- ./static:/app/staticfiles
|
||||
- ./web/staticfiles:/app/staticfiles
|
||||
# - ./media:/app/media
|
||||
ports:
|
||||
- "8106:8106"
|
||||
|
||||
expose:
|
||||
- 8000
|
||||
|
||||
depends_on:
|
||||
- redis
|
||||
# - vpn
|
||||
@ -43,14 +40,12 @@ services:
|
||||
# ports:
|
||||
# - "80:80"
|
||||
# volumes:
|
||||
|
||||
# - ./static:/home/app/static
|
||||
# # - ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
# # - ./nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf
|
||||
# - ./nginx/nginx/conf.d/nginx.conf:/etc/nginx/conf.d/nginx.conf
|
||||
# depends_on:
|
||||
# - web
|
||||
|
||||
# restart: always
|
||||
# restart: always
|
||||
|
||||
|
||||
redis:
|
||||
|
||||
@ -17,6 +17,8 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
|
||||
WORKDIR /app/web
|
||||
|
||||
RUN cd /app/web && mkdir logs
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY . .
|
||||
|
||||
@ -129,7 +129,7 @@ USE_TZ = True
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/5.2/howto/static-files/
|
||||
|
||||
STATIC_URL = '/staticfiles/'
|
||||
STATIC_URL = 'staticfiles'
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
||||
|
||||
# Default primary key field type
|
||||
@ -148,21 +148,28 @@ CHANNEL_LAYERS = {
|
||||
},
|
||||
}
|
||||
|
||||
# LOGGING = {
|
||||
# 'version': 1,
|
||||
# 'disable_existing_loggers': False,
|
||||
# 'handlers': {
|
||||
# 'file': {
|
||||
# 'level': 'WARNING',
|
||||
# 'class': 'logging.FileHandler',
|
||||
# 'filename': '/app/logs/django.log',
|
||||
# },
|
||||
# },
|
||||
# 'loggers': {
|
||||
# 'django': {
|
||||
# 'handlers': ['file'],
|
||||
# 'level': 'WARNING',
|
||||
# 'propagate': True,
|
||||
# },
|
||||
# },
|
||||
# }
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False, # чтобы не отключать встроенные логи Django
|
||||
'formatters': {
|
||||
'simple': {
|
||||
'format': '[{levelname}] {asctime} {name}: {message}',
|
||||
'style': '{',
|
||||
},
|
||||
},
|
||||
'handlers': {
|
||||
'console': {
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'simple',
|
||||
},
|
||||
'file': {
|
||||
'class': 'logging.FileHandler',
|
||||
'filename': os.path.join(BASE_DIR,'logs', 'django.log'),
|
||||
'formatter': 'simple',
|
||||
},
|
||||
},
|
||||
'root': {
|
||||
'handlers': ['console', 'file'],
|
||||
'level': 'INFO',
|
||||
},
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user