This commit is contained in:
Ahmed Nagi 2025-01-22 11:32:25 +00:00
parent 7ac0b3f8ee
commit a61c00671f
4 changed files with 8 additions and 8 deletions

View file

@ -4,7 +4,7 @@
DJANGO_SETTINGS_MODULE=config.settings.production
DJANGO_SECRET_KEY=CQHQz4M3wN1VL2TT53Gl8yupKOjQ5m01js4jPw6bQsUexzkdy9JGXhQg9h6H24M5
DJANGO_ADMIN_URL=6XfjlokEGlPf6SpVfGh7wBvs7t5ZFMDs/
DJANGO_ALLOWED_HOSTS=.learngpt.tech
DJANGO_ALLOWED_HOSTS=.example.com
SIGNING_KEY=HQz4M3wN1ebd0c2f345ede5we324@#$%$#@#R$Q#Zaexsredg/*43/54333e729e
# Security

View file

@ -31,7 +31,7 @@ certificatesResolvers:
http:
routers:
web-secure-router:
rule: 'Host(`learngpt.tech`) || Host(`www.learngpt.tech`)'
rule: 'Host(`example.com`) || Host(`www.example.com`)'
entryPoints:
- web-secure
middlewares:
@ -42,7 +42,7 @@ http:
certResolver: letsencrypt
flower-secure-router:
rule: 'Host(`learngpt.tech`)'
rule: 'Host(`example.com`)'
entryPoints:
- flower
service: flower
@ -51,7 +51,7 @@ http:
certResolver: letsencrypt
web-media-router:
rule: '(Host(`learngpt.tech`) || Host(`www.learngpt.tech`)) && PathPrefix(`/media/`)'
rule: '(Host(`example.com`) || Host(`www.example.com`)) && PathPrefix(`/media/`)'
entryPoints:
- web-secure
middlewares:

View file

@ -19,7 +19,7 @@ from .base import env
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env("DJANGO_SECRET_KEY")
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["learngpt.tech"])
ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["example.com"])
# DATABASES
# ------------------------------------------------------------------------------
@ -87,7 +87,7 @@ STORAGES = {
# https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email
DEFAULT_FROM_EMAIL = env(
"DJANGO_DEFAULT_FROM_EMAIL",
default="Learning Management System <noreply@learngpt.tech>",
default="Learning Management System <noreply@example.com>",
)
# https://docs.djangoproject.com/en/dev/ref/settings/#server-email
SERVER_EMAIL = env("DJANGO_SERVER_EMAIL", default=DEFAULT_FROM_EMAIL)
@ -200,7 +200,7 @@ sentry_sdk.init(
# -------------------------------------------------------------------------------
# Tools that generate code samples can use SERVERS to point to the correct domain
SPECTACULAR_SETTINGS["SERVERS"] = [
{"url": "https://learngpt.tech", "description": "Production server"},
{"url": "https://example.com", "description": "Production server"},
]
# Your stuff...
# ------------------------------------------------------------------------------

View file

@ -6,7 +6,7 @@ http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-djan
from django.conf import settings
from django.db import migrations
domain_name = "learngpt.tech" # Front end domain
domain_name = "example.com" # Front end domain
def _update_or_create_site_with_sequence(site_model, connection, domain, name):
"""Update or create the site with default ID and keep the DB sequence in sync."""