* Log (failed) attempt to notify a user with viewer role * Remove old publishing workflow Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Add publishing workflows for next (unreleased) and released documentation Notable features: - Merges are blocked by strict Hugo reference checking. However, this only works for references that resolve within the repository. Once you have Hugo references to website pages beyond this repository, you will want to remove this test job. - Pushes to main are automatically published to "next" documentation consistent with our other OSS projects. - Pushes of release tags publish to a versioned directory in the website. The website uses `v<MAJOR>.<MINOR>.x` versioning and the "Determine technical documentation version" step will make sure that a tag such as `v0.20.7` is mapped to `v0.20.x`. - Pushes to release branches will only be published if there is an existing corresponding release tag. For example, pushing to a new release branch `release-0.1000` will not trigger a publish of documentation until there is a `v0.1000.0` release tag. > **Note:** I have used a release branch naming convention `release-<MAJOR>-<MINOR>` which is consistent with grafana/mimir but I see that in the old amixr repository there are long lived release branches for patch versions. If that is required. I can update this PR to support that but I would recommend not including patch versions in release branch naming unless you have a good reason to do so. Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Add helm chaart installation * s/mimir/oncall/ Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Remove https:// prefix from BASE_URL docker env var * Fix cloud heartbeat name * Polishing telegram * Update docker-compose.yml * Update plugin README (#48) * Update README and screenshot, remove plop for build info since version is now displayed prominently * Sign build Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * Build actions (#38) * Drone, github action changes * Minor version updates * Update frontend dependencies * Re-enable unit test Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * Revert stylelint version (#52) * Revert stylelint version * Build plugin as well as lint * Build in previous step Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * Update screenshot (#53) Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * oncall images for docs (#55) * Fix chart * Finalise helm chart * Update README.md * Top menu fix * Fix db encoding * Add api key docs * Reverting utf8 fix * bug fixes * fix for link for OSS version * Fixing utf8 and docker compose * 8080 -> 8000 port for consistency * Improve the helm chart * makeReq * Fixing images * Fixing port * Fixing port * Fixing port * Fixing port * Fixing port * Fixing port * Fixing port * Add last moment improvements * Fixing port * Replace symlink with file for CHANGELOG.MD (#68) Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * Edit Chart.yaml * Edit version * Edit README.md * Fixing port * Update README.md * Fix linting * image: grafana/oncall * Merge dev to main (#71) * Merge dev to main (#54) * Log (failed) attempt to notify a user with viewer role * Remove https:// prefix from BASE_URL docker env var * Fix cloud heartbeat name * Polishing telegram * Update docker-compose.yml * Update plugin README (#48) * Update README and screenshot, remove plop for build info since version is now displayed prominently * Sign build Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * Build actions (#38) * Drone, github action changes * Minor version updates * Update frontend dependencies * Re-enable unit test Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * Revert stylelint version (#52) * Revert stylelint version * Build plugin as well as lint * Build in previous step Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * Update screenshot (#53) Co-authored-by: Michael Derynck <michael.derynck@grafana.com> Co-authored-by: Matias Bordese <mbordese@gmail.com> Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com> Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com> Co-authored-by: Matvey Kukuy <matvey@amixr.io> Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * Merge dev to main (#69) * Log (failed) attempt to notify a user with viewer role * Remove https:// prefix from BASE_URL docker env var * Fix cloud heartbeat name * Polishing telegram * Update docker-compose.yml * Update plugin README (#48) * Update README and screenshot, remove plop for build info since version is now displayed prominently * Sign build Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * Build actions (#38) * Drone, github action changes * Minor version updates * Update frontend dependencies * Re-enable unit test Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * Revert stylelint version (#52) * Revert stylelint version * Build plugin as well as lint * Build in previous step Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * Update screenshot (#53) Co-authored-by: Michael Derynck <michael.derynck@grafana.com> * oncall images for docs (#55) * Update README.md * Top menu fix * Fix db encoding * Add api key docs * Reverting utf8 fix * bug fixes * fix for link for OSS version * Fixing utf8 and docker compose * 8080 -> 8000 port for consistency * makeReq * Fixing images * Fixing port * Fixing port * Fixing port * Fixing port * Fixing port * Fixing port * Fixing port * Fixing port * Replace symlink with file for CHANGELOG.MD (#68) Co-authored-by: Michael Derynck <michael.derynck@grafana.com> Co-authored-by: Matias Bordese <mbordese@gmail.com> Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com> Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com> Co-authored-by: Matvey Kukuy <matvey@amixr.io> Co-authored-by: Michael Derynck <michael.derynck@grafana.com> Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com> Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com> Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com> Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com> Co-authored-by: Matias Bordese <mbordese@gmail.com> Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com> Co-authored-by: Matvey Kukuy <matvey@amixr.io> Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com> Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com> Co-authored-by: Matias Bordese <mbordese@gmail.com> Co-authored-by: Jack Baldry <jack.baldry@grafana.com> Co-authored-by: Ildar Iskhakov <ildar.iskhakov@grafana.com> Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com> Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com> Co-authored-by: Matvey Kukuy <matvey@amixr.io> Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com> Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
85 lines
2.5 KiB
Python
85 lines
2.5 KiB
Python
import os
|
|
import sys
|
|
|
|
# Workaround to use pymysql instead of mysqlclient
|
|
import pymysql
|
|
|
|
from .prod_without_db import * # noqa
|
|
|
|
pymysql.install_as_MySQLdb()
|
|
|
|
DATABASES = {
|
|
"default": {
|
|
"ENGINE": "django.db.backends.mysql",
|
|
"NAME": os.environ.get("MYSQL_DB_NAME"),
|
|
"USER": os.environ.get("MYSQL_USER"),
|
|
"PASSWORD": os.environ["MYSQL_PASSWORD"],
|
|
"HOST": os.environ.get("MYSQL_HOST"),
|
|
"PORT": os.environ.get("MYSQL_PORT"),
|
|
"OPTIONS": {
|
|
"charset": "utf8mb4",
|
|
"connect_timeout": 1,
|
|
},
|
|
},
|
|
}
|
|
|
|
RABBITMQ_USERNAME = os.environ.get("RABBITMQ_USERNAME")
|
|
RABBITMQ_PASSWORD = os.environ.get("RABBITMQ_PASSWORD")
|
|
RABBITMQ_HOST = os.environ.get("RABBITMQ_HOST")
|
|
RABBITMQ_PORT = os.environ.get("RABBITMQ_PORT")
|
|
|
|
CELERY_BROKER_URL = f"amqp://{RABBITMQ_USERNAME}:{RABBITMQ_PASSWORD}@{RABBITMQ_HOST}:{RABBITMQ_PORT}"
|
|
|
|
REDIS_PASSWORD = os.environ.get("REDIS_PASSWORD")
|
|
REDIS_HOST = os.environ.get("REDIS_HOST")
|
|
REDIS_PORT = os.environ.get("REDIS_PORT", "6379")
|
|
REDIS_URI = f"redis://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}"
|
|
|
|
CACHES = {
|
|
"default": {
|
|
"BACKEND": "redis_cache.RedisCache",
|
|
"LOCATION": [
|
|
REDIS_URI,
|
|
],
|
|
"OPTIONS": {
|
|
"DB": 1,
|
|
"PARSER_CLASS": "redis.connection.HiredisParser",
|
|
"CONNECTION_POOL_CLASS": "redis.BlockingConnectionPool",
|
|
"CONNECTION_POOL_CLASS_KWARGS": {
|
|
"max_connections": 50,
|
|
"timeout": 20,
|
|
},
|
|
"MAX_CONNECTIONS": 1000,
|
|
"PICKLE_VERSION": -1,
|
|
},
|
|
},
|
|
}
|
|
|
|
APPEND_SLASH = False
|
|
SECURE_SSL_REDIRECT = False
|
|
|
|
TESTING = "pytest" in sys.modules or "unittest" in sys.modules
|
|
|
|
|
|
if TESTING:
|
|
TELEGRAM_TOKEN = "0000000000:XXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX"
|
|
TWILIO_AUTH_TOKEN = "twilio_auth_token"
|
|
|
|
# TODO: OSS: Add these setting to oss settings file. Add Version there too.
|
|
OSS_INSTALLATION_FEATURES_ENABLED = True
|
|
|
|
INSTALLED_APPS += ["apps.oss_installation"] # noqa
|
|
|
|
CELERY_BEAT_SCHEDULE["send_usage_stats"] = { # noqa
|
|
"task": "apps.oss_installation.tasks.send_usage_stats_report",
|
|
"schedule": crontab(hour=0, minute=randrange(0, 59)), # Send stats report at a random minute past midnight # noqa
|
|
"args": (),
|
|
} # noqa
|
|
|
|
CELERY_BEAT_SCHEDULE["send_cloud_heartbeat"] = { # noqa
|
|
"task": "apps.oss_installation.tasks.send_cloud_heartbeat",
|
|
"schedule": crontab(minute="*/3"), # noqa
|
|
"args": (),
|
|
} # noqa
|
|
|
|
SEND_ANONYMOUS_USAGE_STATS = True
|