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: