diff --git a/docker-compose.yml b/docker-compose.yml index ff248cb4f..e1b3c04c6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,6 +23,8 @@ services: server: image: beryju/passbook:${SERVER_TAG:-latest} command: + - ./manage.py + - bootstrap - uwsgi - uwsgi.ini environment: @@ -42,6 +44,8 @@ services: worker: image: beryju/passbook:${SERVER_TAG:-latest} command: + - ./manage.py + - bootstrap - celery - worker - --autoscale=10,3 diff --git a/helm/templates/web-deployment.yaml b/helm/templates/web-deployment.yaml index 25f8efac9..82cca7e79 100644 --- a/helm/templates/web-deployment.yaml +++ b/helm/templates/web-deployment.yaml @@ -27,9 +27,12 @@ spec: initContainers: - name: passbook-database-migrations image: "beryju/passbook:{{ .Values.image.tag }}" + imagePullPolicy: Always command: - ./manage.py args: + - bootstrap + - ./manage.py - migrate volumeMounts: - mountPath: /etc/passbook @@ -57,10 +60,12 @@ spec: containers: - name: {{ .Chart.Name }} image: "beryju/passbook:{{ .Values.image.tag }}" - imagePullPolicy: IfNotPresent + imagePullPolicy: Always command: - - uwsgi + - ./manage.py args: + - bootstrap + - uwsgi - uwsgi.ini volumeMounts: - mountPath: /etc/passbook diff --git a/helm/templates/worker-deployment.yaml b/helm/templates/worker-deployment.yaml index f1ec43f1c..78fc9fe93 100644 --- a/helm/templates/worker-deployment.yaml +++ b/helm/templates/worker-deployment.yaml @@ -29,8 +29,10 @@ spec: image: "beryju/passbook:{{ .Values.image.tag }}" imagePullPolicy: IfNotPresent command: - - celery + - ./manage.py args: + - bootstrap + - celery - worker - --autoscale=10,3 - -E