From e898941597fb542db920ada110bcb5b87f7a91f0 Mon Sep 17 00:00:00 2001 From: Hemang Date: Tue, 18 Feb 2025 09:59:53 +0100 Subject: [PATCH] Allow the localhost instance to be accessible even without a local Traefik instance running. --- docker-compose.local.yml | 4 +++- run.sh | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker-compose.local.yml b/docker-compose.local.yml index 3096fe1..c6a8606 100644 --- a/docker-compose.local.yml +++ b/docker-compose.local.yml @@ -15,8 +15,10 @@ services: target: /srv/proxy networks: - invariant-explorer-web - ports: [] + ports: + - "8005:8000" # Direct access without Traefik labels: + # For access via Traefik - "traefik.enable=true" - "traefik.http.routers.explorer-proxy-api.rule=(Host(`localhost`) && PathPrefix(`/api/v1/proxy/`)) || (Host(`127.0.0.1`) && PathPrefix(`/api/v1/proxy/`))" - "traefik.http.routers.explorer-proxy-api.entrypoints=invariant-explorer-web" diff --git a/run.sh b/run.sh index ed995ee..226f04c 100755 --- a/run.sh +++ b/run.sh @@ -6,8 +6,8 @@ up() { # Start your local docker-compose services docker compose -f docker-compose.local.yml up -d - echo "Proxy started at http://localhost/api/v1/proxy/" - echo "See http://localhost/api/v1/proxy/docs for API documentation" + echo "Proxy started at http://localhost:8005/api/v1/proxy/" + echo "See http://localhost:8005/api/v1/proxy/docs for API documentation" } build() {