From 4e613a943ee0508c471961bac2a46aeb00b87ebf Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Wed, 28 Aug 2024 15:19:38 +0200 Subject: [PATCH] Port 8000 as the default port _everywhere_ This is more canonical with stuff 'elsewhere on the internet' we already did it behind-the-scenes for 'recommended gunicorn', so the harmonization is in having the same default for the rest. --- Dockerfile | 4 ++-- bugsink/app_settings.py | 2 +- bugsink/conf_templates/docker.py.template | 2 +- bugsink/scripts/create_conf.py | 2 +- bugsink/settings/development.py | 2 +- compat/tests.py | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index b397b5d..6541d57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,6 @@ COPY bugsink/conf_templates/docker.py.template bugsink_conf.py RUN ["bugsink-manage", "migrate", "snappea", "--database=snappea"] -EXPOSE 9000 +EXPOSE 8000 -CMD [ "bugsink-server-unified", "gunicorn", "--bind=0.0.0.0:9000", "--workers=10", "--access-logfile", "-", "bugsink.wsgi", "UNIFIED_WITH", "bugsink-runsnappea"] +CMD [ "bugsink-server-unified", "gunicorn", "--bind=0.0.0.0:8000", "--workers=10", "--access-logfile", "-", "bugsink.wsgi", "UNIFIED_WITH", "bugsink-runsnappea"] diff --git a/bugsink/app_settings.py b/bugsink/app_settings.py index 165fd0f..04b4ea5 100644 --- a/bugsink/app_settings.py +++ b/bugsink/app_settings.py @@ -18,7 +18,7 @@ CB_NOBODY = "CB_NOBODY" DEFAULTS = { - "BASE_URL": "http://127.0.0.1:9000", # no trailing slash + "BASE_URL": "http://127.0.0.1:8000", # no trailing slash "SITE_TITLE": "Bugsink", # you can customize this as e.g. "My Bugsink" or "Bugsink for My Company" # Users, teams, projects diff --git a/bugsink/conf_templates/docker.py.template b/bugsink/conf_templates/docker.py.template index bf22e3b..b81bf49 100644 --- a/bugsink/conf_templates/docker.py.template +++ b/bugsink/conf_templates/docker.py.template @@ -76,7 +76,7 @@ BUGSINK = { "DIGEST_IMMEDIATELY": False, # hard-coded, corresponds to Docker setup # The URL where the Bugsink instance is hosted. This is used in the email notifications and to construct DSNs. - "BASE_URL": os.getenv("BASE_URL", "http://localhost:9000"), # no trailing slash + "BASE_URL": os.getenv("BASE_URL", "http://localhost:8000"), # no trailing slash # you can customize this as e.g. "My Bugsink" or "Bugsink for My Company" "SITE_TITLE": os.getenv("SITE_TITLE", "Bugsink"), diff --git a/bugsink/scripts/create_conf.py b/bugsink/scripts/create_conf.py index 87d73fc..8514351 100644 --- a/bugsink/scripts/create_conf.py +++ b/bugsink/scripts/create_conf.py @@ -12,7 +12,7 @@ def main(): parser.add_argument( "--template", help="Template to use; recommended or local", choices=["recommended", "local", "docker"]) - parser.add_argument("--port", help="Port to use in SITE_TITLE ; default is 9000", type=int, default=9000) + parser.add_argument("--port", help="Port to use in SITE_TITLE ; default is 8000", type=int, default=8000) parser.add_argument("--host", help="Host to use in SITE_TITLE ; default is 127.0.0.1", default="127.0.0.1") args = parser.parse_args() diff --git a/bugsink/settings/development.py b/bugsink/settings/development.py index 206b0bc..1117380 100644 --- a/bugsink/settings/development.py +++ b/bugsink/settings/development.py @@ -122,7 +122,7 @@ BUGSINK = { # "MAX_ENVELOPE_SIZE": 100 * _MEBIBYTE, # "MAX_ENVELOPE_COMPRESSED_SIZE": 20 * _MEBIBYTE, - "BASE_URL": "http://bugsink:9000", # no trailing slash + "BASE_URL": "http://bugsink:8000", # no trailing slash "SITE_TITLE": "Bugsink", # you can customize this as e.g. "My Bugsink" or "Bugsink for My Company" } diff --git a/compat/tests.py b/compat/tests.py index 288909e..a044c2b 100644 --- a/compat/tests.py +++ b/compat/tests.py @@ -21,8 +21,8 @@ class DsnTestCase(RegularTestCase): def test_build_dsn_non_default_port(self): self.assertEqual( - "https://public_key@hosted.bugsink:9000/1", - build_dsn("https://hosted.bugsink:9000", "1", "public_key")) + "https://public_key@hosted.bugsink:8000/1", + build_dsn("https://hosted.bugsink:8000", "1", "public_key")) def test_get_store_url(self): self.assertEqual(