Skip to content

Commit

Permalink
Merge pull request #26 from openearthplatforminitiative/fix/add-root-…
Browse files Browse the repository at this point in the history
…path

Fix/add root path
  • Loading branch information
giltinde authored Jun 12, 2024
2 parents 44da62c + 2bf55db commit 4c0dfd0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion deforestation_api/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ async def lifespan(deforestation_app: FastAPI):
app.include_router(healthcheck.router)

# The OpenEPI logo needs to be served as a static file since it is referenced in the OpenAPI schema
app.mount("/static", StaticFiles(directory="deforestation_api/assets/"), name="static")
app.mount(
f"/{settings.api_root_path}/static",
StaticFiles(directory="deforestation_api/assets"),
name="static",
)

logging.basicConfig(level=logging.INFO)

Expand Down
4 changes: 2 additions & 2 deletions deployment/kubernetes/deforestation-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ spec:
prometheus.io/path: "/metrics"
spec:
containers:
- image: ghcr.io/openearthplatforminitiative/deforestation-api:0.3.3
- image: ghcr.io/openearthplatforminitiative/deforestation-api:0.3.4
name: deforestation-api
ports:
- containerPort: 8080
env:
- name: API_ROOT_PATH
value: "/deforestation"
- name: VERSION
value: 0.3.3
value: 0.3.4
- name: API_DOMAIN
valueFrom:
configMapKeyRef:
Expand Down

0 comments on commit 4c0dfd0

Please sign in to comment.