diff --git a/docker-compose.yml b/docker-compose.yml index feb268a..534fdc0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,7 +31,8 @@ services: - DEBUG='1' - JWT_SECRET=your_jwt_secret_here - ENABLE_DJANGO_ADMIN='0' - - DOMAIN_NAME='localhost' + - SITE_DOMAIN='localhost' + - FRONTEND_DOMAIN='localhost' depends_on: - postgres - redis diff --git a/promptsmith/.env.default b/promptsmith/.env.default index 847dc41..87da833 100644 --- a/promptsmith/.env.default +++ b/promptsmith/.env.default @@ -11,10 +11,10 @@ POSTGRES_DB='ps' POSTGRES_USER='postgres' POSTGRES_PASSWORD='' - ENABLE_DJANGO_ADMIN='False' -DOMAIN_NAME='localhost' +SITE_DOMAIN='localhost' +FRONTEND_DOMAIN='localhost' SERVER_EMAIL='contact@localhost' EMAIL_HOST='localhost' @@ -22,5 +22,3 @@ EMAIL_PORT='1025' EMAIL_HOST_USER='user' EMAIL_HOST_PASSWORD='password' EMAIL_USE_TLS='True' - - diff --git a/promptsmith/settings.py b/promptsmith/settings.py index 34f5af2..bb0b016 100644 --- a/promptsmith/settings.py +++ b/promptsmith/settings.py @@ -44,7 +44,8 @@ RUNNING_DEVELOPMENT_SERVER = (len(sys.argv) > 1 and sys.argv[1] == 'runserver') ENABLE_DJANGO_ADMIN = os.getenv('ENABLE_DJANGO_ADMIN', False) == '1' -SITE_DOMAIN = os.getenv('DOMAIN_NAME', 'localhost') +SITE_DOMAIN = os.getenv('SITE_DOMAIN', 'localhost') +FRONTEND_DOMAIN = os.getenv('FRONTEND_DOMAIN', 'localhost') ALLOWED_HOSTS = [ 'localhost', @@ -52,6 +53,7 @@ 'backend', 'frontend', SITE_DOMAIN, + FRONTEND_DOMAIN, ] CORS_ALLOWED_ORIGINS = [ @@ -67,6 +69,9 @@ 'http://api.{}'.format(SITE_DOMAIN), 'http://app.{}'.format(SITE_DOMAIN), 'http://www.{}'.format(SITE_DOMAIN), + 'https://{}'.format(FRONTEND_DOMAIN), + 'https://www.{}'.format(FRONTEND_DOMAIN), + 'https://app.{}'.format(FRONTEND_DOMAIN), ] CORS_ALLOW_CREDENTIALS = True # allow cookies in Lax mode managed in session cookie same site