From 0d6968ff0af68b6d0f25d2c9c9a386a132a27177 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Sat, 25 Jun 2022 18:39:53 +0530 Subject: [PATCH] feat: custom parameters template --- dashboard/local_settings.example.py | 82 +++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 dashboard/local_settings.example.py diff --git a/dashboard/local_settings.example.py b/dashboard/local_settings.example.py new file mode 100644 index 0000000..8cf28a8 --- /dev/null +++ b/dashboard/local_settings.example.py @@ -0,0 +1,82 @@ +""" +Django settings for dashboard project. + +Generated by 'django-admin startproject' using Django 4.0.3. + +For more information on this file, see +https://docs.djangoproject.com/en/4.0/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/4.0/ref/settings/ +""" +import environ +import os + +env = environ.Env() + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = "django-insecure-44zt@)$td7_yh(01q^hrce%h(311n!djn%%#s1b7$cvfy!pf7y" + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Database +# https://docs.djangoproject.com/en/4.0/ref/settings/#databases + +DATABASES = { + "default": env.db_url( + "DATABSE_URL", default="postgres://postgres:password@localhost:5432/postgres" + ) +} + + +## django-payments configuration + +PAYMENT_HOST = "http://localhost:8000" +PAYMENT_VARIANTS = { + "stripe": ( + "payments.stripe.StripeProvider", # please don't change this + { + "secret_key": env.get_value("STRIPE_SECRET_KEY"), + "public_key": env.get_value("STRIPE_PUBLIC_KEY"), + }, + ) +} + + +### Dashbaord specific configuration options + +HOSTEA = { + "INSTANCE_MAINTAINER_CONTACT": "contact@hostea.example.org", + "ACCOUNTS": { + "MAX_VERIFICATION_TOLERANCE_PERIOD": 60 * 60 * 24, # in seconds + "SUDO_TTL": 60 * 5, + }, + "META": { + "GITEA_INSTANCE": "https://gitea.hostea.org", # meta Gitea insatnce + "GITEA_ORG_NAME": "Hostea", # Organisation name on Hostea meta instance + # Repository dedicated for handling support + # ref: https://gitea.hostea.org/Hostea/july-mvp/issues/17 + "SUPPORT_REPOSITORY": "support", + }, + "INFRA": { + "HOSTEA_REPO": { + # where to clone the repository + "PATH": "/srv/hostea/dashboard/infrastructure", + # Git remote URI of the repository + "REMOTE": "git@localhost:Hostea/enough.git", + # SSH key that can push to the Git repository remote mentioned above + "SSH_KEY": "/srv/hostea/deploy", + } + }, +} + +EMAIL_CONFIG = env.email("EMAIL_URL", default="smtp://admin:password@localhost:10025") + +vars().update(EMAIL_CONFIG)