Skip to content

Commit

Permalink
fix: update backend url environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
vncsna committed May 24, 2024
1 parent bfd7e96 commit 1ebe605
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions backend/custom/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
from functools import wraps
from os import getenv

WORKER = getenv("WORKER", "aux")
API_URL = getenv("BASE_URL_API", "https://localhost:8080")
API_URL = getenv("BASE_URL_BACKEND", "https://localhost:8080")
SETTINGS = getenv("DJANGO_SETTINGS_MODULE", "backend.settings")


Expand All @@ -14,13 +13,6 @@ def is_remote():
return False


def is_main():
"""Check if it is main environment"""
if "main" in WORKER:
return True
return False


def is_dev():
"""Check if it is remote development environment"""
if is_remote() and "development" in API_URL:
Expand Down Expand Up @@ -71,7 +63,7 @@ def production_task(func):

@wraps(func)
def wrapper(*args, **kwargs):
if is_prd() and is_main():
if is_prd():
return func(*args, **kwargs)

return wrapper
2 changes: 1 addition & 1 deletion backend/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
}

# URLs
BACKEND_URL = getenv("BASE_URL_API", "https://localhost:8080")
BACKEND_URL = getenv("BASE_URL_BACKEND", "https://localhost:8080")
FRONTEND_URL = getenv("BASE_URL_FRONTEND", "https://localhost:3000")

# Discord
Expand Down

0 comments on commit 1ebe605

Please sign in to comment.