From a61c00671f54ce35a615b707941fd610dcc373f4 Mon Sep 17 00:00:00 2001 From: Ahmed Nagi <144544047+mindfreq@users.noreply.github.com> Date: Wed, 22 Jan 2025 11:32:25 +0000 Subject: [PATCH] update --- backend/.envs/.production/.django | 2 +- backend/compose/production/traefik/traefik.yml | 6 +++--- backend/config/settings/production.py | 6 +++--- .../sites/migrations/0003_set_site_domain_and_name.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/.envs/.production/.django b/backend/.envs/.production/.django index 9150a91..77ad410 100644 --- a/backend/.envs/.production/.django +++ b/backend/.envs/.production/.django @@ -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 diff --git a/backend/compose/production/traefik/traefik.yml b/backend/compose/production/traefik/traefik.yml index 1a1171f..dc0d2ec 100644 --- a/backend/compose/production/traefik/traefik.yml +++ b/backend/compose/production/traefik/traefik.yml @@ -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: diff --git a/backend/config/settings/production.py b/backend/config/settings/production.py index 5fdc9aa..9f6a3b7 100644 --- a/backend/config/settings/production.py +++ b/backend/config/settings/production.py @@ -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 ", + default="Learning Management System ", ) # 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... # ------------------------------------------------------------------------------ diff --git a/backend/lms/contrib/sites/migrations/0003_set_site_domain_and_name.py b/backend/lms/contrib/sites/migrations/0003_set_site_domain_and_name.py index b684ceb..7ae509f 100644 --- a/backend/lms/contrib/sites/migrations/0003_set_site_domain_and_name.py +++ b/backend/lms/contrib/sites/migrations/0003_set_site_domain_and_name.py @@ -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."""