Skip to content

Commit

Permalink
fix: api odds & ends
Browse files Browse the repository at this point in the history
  • Loading branch information
hagzag committed Nov 26, 2023
1 parent 8c85b28 commit a96f2b8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ RUN poetry install --no-interaction --no-ansi
# Copy the content of the local src directory to the working directory
COPY . /usr/src/app

# Specify the command to run on container start
# api
CMD [ "poetry", "run", "uvicorn", "api:app", "--host", "0.0.0.0", "--port", "5000"]

5 changes: 5 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ tasks:
cmds:
- kubectl apply -k ./deploy

port_forward_demo_app:
desc: port-forward to demo_app
cmds:
- kubectl port-forward -n keda-poc svc/api 8000:80 -n keda-poc

deploy_monitor:
desc: deploy prometheus
cmds:
Expand Down
1 change: 1 addition & 0 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

# Instrument the app
Instrumentator().instrument(app).expose(app)

class ScaleResponse(BaseModel):
desiredReplicas: int

Expand Down
3 changes: 2 additions & 1 deletion deploy/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ namespace: keda-poc
images:
- name: docker.io/hagzag/keda-py
newName: ghcr.io/hagzag/keda-poc
newTag: latest
newTag: latest-main
newTag: latest-main@sha256:7f87485b8308a864fe6fc9def69efb2758539f9b98286d5040383e06f9f3fa03

0 comments on commit a96f2b8

Please sign in to comment.