From a1e1bf315d8beefee18eaa818bdafe7bda19f518 Mon Sep 17 00:00:00 2001 From: Lucas Pickering Date: Sun, 30 Jul 2023 19:34:02 -0400 Subject: [PATCH] Fix deploy command for prd --- api/Dockerfile | 2 -- api/scripts/cmd_prd.sh | 4 +--- deploy/helm/templates/api.yml | 2 ++ docker-compose.yml | 1 + 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index b97235d7..453c981a 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -29,5 +29,3 @@ ADD poetry.toml pyproject.toml poetry.lock ./ RUN poetry install ${POETRY_INSTALL_ARGS} ADD . . - -CMD ["./scripts/cmd_dev.sh"] diff --git a/api/scripts/cmd_prd.sh b/api/scripts/cmd_prd.sh index 6cabf012..36ab5121 100755 --- a/api/scripts/cmd_prd.sh +++ b/api/scripts/cmd_prd.sh @@ -2,7 +2,5 @@ set -ex -cd src - -./manage.py migrate +./m.sh migrate gunicorn beta_spray.wsgi -b :8000 diff --git a/deploy/helm/templates/api.yml b/deploy/helm/templates/api.yml index c5e09ffe..a05e11f3 100644 --- a/deploy/helm/templates/api.yml +++ b/deploy/helm/templates/api.yml @@ -22,6 +22,8 @@ spec: containers: - name: api image: "ghcr.io/lucaspickering/beta-spray-api:{{ .Values.versionSha }}" + command: + - ./scripts/cmd_prd.sh resources: requests: cpu: 50m diff --git a/docker-compose.yml b/docker-compose.yml index bb94e09f..6b593509 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,6 +23,7 @@ services: api: build: ./api/ + command: ./scripts/cmd_dev.sh init: true # Fixes slow shutdown tty: true # Colors! environment: