diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index d9d9011f4af5a2e7b7679df622e8d03aa8cd28c5..03803baae78de04f8fc6179b29237775a37c4d7b 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -106,8 +106,7 @@ spec: securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ template "fpm_image" . }}" - command: ["/bin/bash", "-c"] - args: ["/usr/local/bin/php artisan schedule:run && /usr/local/bin/php artisan schedule:work"] + command: ["/usr/local/bin/php", "artisan", "schedule:work"] imagePullPolicy: {{ .Values.image.fpm.pullPolicy }} env: - name: APP_ENV @@ -143,6 +142,13 @@ spec: cpu: 100m memory: 100M limits: + lifecycle: + postStart: + exec: + command: ["/usr/local/bin/php", "artisan" ,"schedule:run"] + preStop: + exec: + command: ["/usr/local/bin/php", "artisan" ,"schedule:run"] - name: worker securityContext: {{- toYaml .Values.securityContext | nindent 12 }}