Skip to content

Commit

Permalink
expose 5050 rather than 8080 in prod dockerfile to match dev config, …
Browse files Browse the repository at this point in the history
…but just make cloud run look at 5050 as well so that everything lines up in dev and deployment
  • Loading branch information
GondekNP committed Jul 29, 2024
1 parent e29c2a8 commit 5f97126
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .deployment/burn_backend/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ FROM base AS runtime
COPY --from=environment /opt/conda /opt/conda
COPY src/ /src/
SHELL ["conda", "run", "-n", "burn-severity-prod", "/bin/bash", "-c"]
EXPOSE 8080
ENTRYPOINT ["conda", "run", "-n", "burn-severity-prod", "uvicorn", "src.burn_backend.app:app", "--host=0.0.0.0", "--port=8080"]
EXPOSE 5050
ENTRYPOINT ["conda", "run", "-n", "burn-severity-prod", "uvicorn", "src.burn_backend.app:app", "--host=0.0.0.0", "--port=5050"]
3 changes: 3 additions & 0 deletions .deployment/tofu/modules/burn_backend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ resource "google_cloud_run_v2_service" "tf-rest-burn-severity" {
timeout = "3599s" # max timeout is one hour
containers {
image = "us-docker.pkg.dev/cloudrun/container/placeholder" # This is a placeholder for first time creation only, replaced by CI/CD in GitHub Actions
ports {
container_port = 5050
}
env {
name = "ENV"
value = "CLOUD"
Expand Down

0 comments on commit 5f97126

Please sign in to comment.