diff --git a/.github/workflows/deploy-opentofu.yml b/.github/workflows/deploy-opentofu.yml index 59ec639..c104295 100644 --- a/.github/workflows/deploy-opentofu.yml +++ b/.github/workflows/deploy-opentofu.yml @@ -17,7 +17,7 @@ on: type: choice options: - staging - - production + - production pull_request: branches: - main diff --git a/web/api/main.py b/web/api/main.py index 28d32bc..fa9ad36 100644 --- a/web/api/main.py +++ b/web/api/main.py @@ -110,7 +110,6 @@ async def get_invocation_by_id(id: ObjectId): app=app, host="0.0.0.0", port=80, - root_path="/api", loop=loop, log_config=LOGGING_CONFIG, ) diff --git a/web/deploy/docker-compose.yaml b/web/deploy/docker-compose.yaml index ef55cc0..9c8fae0 100644 --- a/web/deploy/docker-compose.yaml +++ b/web/deploy/docker-compose.yaml @@ -12,6 +12,8 @@ services: - traefik.enable=true - traefik.docker.network=osm_traefik-public - traefik.http.routers.osm_web_api.rule=Host(`${DEPLOYMENT_URI}`) && PathPrefix(`/api`) + - "traefik.http.middlewares.strip-api-prefix.stripprefix.prefixes=/api" + - "traefik.http.routers.osm_web_api.middlewares=strip-api-prefix@docker" - "traefik.http.routers.osm_web_api.entrypoints=web,websecure" - "traefik.http.routers.osm_web_api.service=osm_web_api" - traefik.http.services.osm_web_api.loadbalancer.server.port=80