diff --git a/charts/dispatch/templates/web-deployment.yaml b/charts/dispatch/templates/web-deployment.yaml index 1829b6d..913a7aa 100644 --- a/charts/dispatch/templates/web-deployment.yaml +++ b/charts/dispatch/templates/web-deployment.yaml @@ -19,15 +19,7 @@ spec: - name: web-db-init image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" command: ["dispatch", "web", "database", "init"] - - containers: - - name: web - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["dispatch", "server", "start", "dispatch.main:app", "--host=0.0.0.0"] - ports: - - containerPort: 8000 - env: + env: &dispatchEnv - name: DISPATCH_UI_URL value: "{{ .Values.url }}" - name: DATABASE_HOSTNAME @@ -36,6 +28,15 @@ spec: value: "{{ .Values.postgres.port }}" - name: DATABASE_NAME value: "{{ .Values.postgres.database_name }}" + + containers: + - name: web + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: ["dispatch", "server", "start", "dispatch.main:app", "--host=0.0.0.0"] + ports: + - containerPort: 8000 + env: *dispatchEnv envFrom: - secretRef: name: {{ .Values.envFromSecret }}