ci: add sll support and enhance e2e workflow

This commit is contained in:
ramvignesh-b
2026-04-17 01:22:03 +05:30
parent f5757b47de
commit c40e3d20cb
21 changed files with 368 additions and 162 deletions
@@ -0,0 +1,30 @@
import os
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import BaseCommand
class Command(BaseCommand):
def handle(self, *args, **options):
"""
Check if SSL is enabled in the environment variables.
If SSL is enabled, use runserver_plus command.
If SSL is not enabled, use runserver command.
"""
ssl_enabled = os.getenv("SSL_ENABLED", "false").lower() == "true"
domain = os.getenv("BACKEND_DOMAIN", "127.0.0.1")
port = os.getenv("BACKEND_PORT", "8000")
addrport = f"{domain}:{port}"
if ssl_enabled:
self.stdout.write(self.style.SUCCESS(f"Starting with SSL on {addrport}..."))
call_command(
"runserver_plus",
addrport,
cert_file=settings.BASE_DIR / "../certs/localhost.pem",
key_file=settings.BASE_DIR / "../certs/localhost-key.pem",
)
else:
self.stdout.write(self.style.WARNING(f"Starting without SSL on {addrport}..."))
call_command("runserver", addrport)