* Modify `docker-compose-developer` configuration files, and `Makefile` to support running everything in containers for local development - Make use of the COMPOSE_PROFILES env var that is supported by docker-compose to allow swapping-out/turning off certain docker-compose services. - add makefile cleanup command. Will remove all docker resources related to running the project locally - The "restart grafana container" issue, where users would need to restart their grafana container when setting up the project for the first time, is now fixed (make command now runs yarn build:dev before docker-compose startup; this ensures grafana-plugin/dist is available for grafana container before it starts up) - The DEVELOPER.md has been updated as well to reflect these new changes. It has been moved to ./dev/README.md (and references to the old file have been updated). - The redis image that is referenced in the docker-compose files has been pinned to v7.0.5 (latest version as of this commit) to avoid any surprises w/ future releases. - remove root .dockerignore in favour of individual .dockerignore files in ./engine and ./grafana-plugin
69 lines
2.1 KiB
Python
69 lines
2.1 KiB
Python
# flake8: noqa
|
|
import os
|
|
import sys
|
|
|
|
from .base import *
|
|
|
|
DEBUG = True
|
|
|
|
if DATABASE_TYPE == DatabaseTypes.SQLITE3:
|
|
DATABASES["default"]["NAME"] = DATABASE_NAME or "oncall_dev.db"
|
|
else:
|
|
DATABASES["default"] |= {
|
|
"NAME": DATABASE_NAME or "oncall_local_dev",
|
|
"USER": DATABASE_USER or DATABASE_DEFAULTS[DATABASE_TYPE]["USER"],
|
|
"PASSWORD": DATABASE_PASSWORD or "empty",
|
|
"HOST": DATABASE_HOST or "127.0.0.1",
|
|
"PORT": DATABASE_PORT or DATABASE_DEFAULTS[DATABASE_TYPE]["PORT"],
|
|
}
|
|
|
|
SECRET_KEY = os.environ.get("SECRET_KEY", "osMsNM0PqlRHBlUvqmeJ7+ldU3IUETCrY9TrmiViaSmInBHolr1WUlS0OFS4AHrnnkp1vp9S9z1")
|
|
MIRAGE_SECRET_KEY = os.environ.get(
|
|
"MIRAGE_SECRET_KEY", "sIrmyTvh+Go+h/2E46SnYGwgkKyH6IF6MXZb65I40HVCbj0+dD3JvpAqppEwFb7Vxnxlvtey+EL"
|
|
)
|
|
MIRAGE_CIPHER_IV = os.environ.get("MIRAGE_CIPHER_IV", "tZZa+60zTZO2NRcS")
|
|
|
|
TESTING = "pytest" in sys.modules or "unittest" in sys.modules
|
|
|
|
SILKY_PYTHON_PROFILER = True
|
|
|
|
# For any requests that come in with that header/value, request.is_secure() will return True.
|
|
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
|
|
|
# Uncomment this to view SQL queries
|
|
# LOGGING = {
|
|
# 'version': 1,
|
|
# 'filters': {
|
|
# 'require_debug_true': {
|
|
# '()': 'django.utils.log.RequireDebugTrue',
|
|
# }
|
|
# },
|
|
# 'handlers': {
|
|
# 'console': {
|
|
# 'level': 'DEBUG',
|
|
# 'filters': ['require_debug_true'],
|
|
# 'class': 'logging.StreamHandler',
|
|
# }
|
|
# },
|
|
# 'loggers': {
|
|
# 'django.db.backends': {
|
|
# 'level': 'DEBUG',
|
|
# 'handlers': ['console'],
|
|
# }
|
|
# }
|
|
# }
|
|
|
|
SILKY_INTERCEPT_PERCENT = 100
|
|
|
|
SWAGGER_SETTINGS = {
|
|
"SECURITY_DEFINITIONS": {
|
|
"Basic": {"type": "basic"},
|
|
"Bearer": {"type": "apiKey", "name": "Authorization", "in": "header"},
|
|
},
|
|
"SUPPORTED_SUBMIT_METHODS": ["get", "post", "put", "delete", "options"],
|
|
}
|
|
|
|
if TESTING:
|
|
EXTRA_MESSAGING_BACKENDS = [("apps.base.tests.messaging_backend.TestOnlyBackend", 42)]
|
|
TELEGRAM_TOKEN = "0000000000:XXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX"
|
|
TWILIO_AUTH_TOKEN = "twilio_auth_token"
|