Fix builds & add better logging
This commit is contained in:
parent
00ef610a65
commit
579c162365
@ -2,6 +2,9 @@ FROM python:3
|
|||||||
|
|
||||||
WORKDIR /usr/src/shynet
|
WORKDIR /usr/src/shynet
|
||||||
|
|
||||||
|
RUN apt update
|
||||||
|
RUN apt install -y gettext
|
||||||
|
|
||||||
# URL from https://github.com/shlinkio/shlink/issues/596 :)
|
# URL from https://github.com/shlinkio/shlink/issues/596 :)
|
||||||
RUN curl "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&license_key=G4Lm0C60yJsnkdPi&suffix=tar.gz" | tar -xvz -C /tmp
|
RUN curl "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&license_key=G4Lm0C60yJsnkdPi&suffix=tar.gz" | tar -xvz -C /tmp
|
||||||
RUN curl "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=G4Lm0C60yJsnkdPi&suffix=tar.gz" | tar -xvz -C /tmp
|
RUN curl "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=G4Lm0C60yJsnkdPi&suffix=tar.gz" | tar -xvz -C /tmp
|
||||||
|
@ -119,6 +119,41 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||||||
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",},
|
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
|
||||||
|
LOGGING = {
|
||||||
|
"version": 1,
|
||||||
|
"disable_existing_loggers": False,
|
||||||
|
"formatters": {
|
||||||
|
"verbose": {
|
||||||
|
"format": "{levelname} {asctime} {module} {process:d} {thread:d} {message}",
|
||||||
|
"style": "{",
|
||||||
|
},
|
||||||
|
"simple": {"format": "{levelname} {message}", "style": "{"},
|
||||||
|
},
|
||||||
|
"filters": {"require_debug_true": {"()": "django.utils.log.RequireDebugTrue"}},
|
||||||
|
"handlers": {
|
||||||
|
"console": {
|
||||||
|
"level": "INFO",
|
||||||
|
"filters": [],
|
||||||
|
"class": "logging.StreamHandler",
|
||||||
|
"formatter": "simple",
|
||||||
|
},
|
||||||
|
"mail_admins": {
|
||||||
|
"level": "ERROR",
|
||||||
|
"class": "django.utils.log.AdminEmailHandler",
|
||||||
|
"filters": [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"loggers": {
|
||||||
|
"django": {"handlers": ["console"], "propagate": True},
|
||||||
|
"django.request": {
|
||||||
|
"handlers": ["mail_admins"],
|
||||||
|
"level": "ERROR",
|
||||||
|
"propagate": True,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/2.2/topics/i18n/
|
# https://docs.djangoproject.com/en/2.2/topics/i18n/
|
||||||
|
Loading…
Reference in New Issue
Block a user