From b26ca1048970cc5c8acd5baaae49a3142f327e27 Mon Sep 17 00:00:00 2001 From: badbl0cks <4161747+badbl0cks@users.noreply.github.com> Date: Fri, 23 May 2025 21:54:14 -0700 Subject: [PATCH] fix(docker): Add missing ALLOWED_HOSTS environment variables to docker-compose_web.yml and docker-compose_staging.yml to prevent security errors. --- server/docker-compose_staging.yml | 16 +++++++++------- server/docker-compose_web.yml | 5 +++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/server/docker-compose_staging.yml b/server/docker-compose_staging.yml index 30cf1f4..90020bc 100644 --- a/server/docker-compose_staging.yml +++ b/server/docker-compose_staging.yml @@ -7,16 +7,17 @@ services: web-staging: <<: *common environment: - - DEBUG=False - - DISABLE_SIGNUPS=True - - PUBLIC_HOST=staging.pkmntrade.club + - DEBUG=False + - DISABLE_SIGNUPS=True + - PUBLIC_HOST=staging.pkmntrade.club + - ALLOWED_HOSTS=staging.pkmntrade.club,127.0.0.1 labels: - "enable_gatekeeper=true" deploy: mode: replicated replicas: 2 # healthcheck: - # test: ["CMD", "curl", "-f", "http://127.0.0.1:8000"] + # test: ["CMD", "curl", "-f", "http://127.0.0.1:8000/health"] # interval: 30s # timeout: 10s # retries: 3 @@ -24,7 +25,8 @@ services: celery-staging: <<: *common environment: - - DEBUG=False - - DISABLE_SIGNUPS=True - - PUBLIC_HOST=staging.pkmntrade.club + - DEBUG=False + - DISABLE_SIGNUPS=True + - PUBLIC_HOST=staging.pkmntrade.club + - ALLOWED_HOSTS=staging.pkmntrade.club,127.0.0.1 command: ["celery", "-A", "pkmntrade_club.django_project", "worker", "-l", "INFO", "-B", "-E"] \ No newline at end of file diff --git a/server/docker-compose_web.yml b/server/docker-compose_web.yml index 8ee6cac..6d453e0 100644 --- a/server/docker-compose_web.yml +++ b/server/docker-compose_web.yml @@ -9,18 +9,18 @@ services: image: ghcr.io/xe/x/httpdebug entrypoint: ["/ko-app/httpdebug", "--bind", ":8000"] #image: badbl0cks/pkmntrade-club:stable - #command: ["granian", "--interface", "wsgi", "pkmntrade_club.django_project.wsgi:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1", "--workers-kill-timeout", "180", "--access-log"] environment: - DEBUG=False - DISABLE_SIGNUPS=True - PUBLIC_HOST=pkmntrade.club + - ALLOWED_HOSTS=pkmntrade.club,127.0.0.1 labels: - "enable_gatekeeper=true" deploy: mode: replicated replicas: 4 # healthcheck: - # test: ["CMD", "curl", "-f", "http://127.0.0.1:8000"] + # test: ["CMD", "curl", "-f", "http://127.0.0.1:8000/health"] # interval: 30s # timeout: 10s # retries: 3 @@ -32,4 +32,5 @@ services: # - DEBUG=False # - DISABLE_SIGNUPS=True # - PUBLIC_HOST=pkmntrade.club + # - ALLOWED_HOSTS=pkmntrade.club,127.0.0.1 # command: ["celery", "-A", "pkmntrade_club.django_project", "worker", "-l", "INFO", "-B", "-E"] \ No newline at end of file