Skip to content

Instantly share code, notes, and snippets.

@oceanapplications
Created August 22, 2021 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oceanapplications/e779873648b0ba2c204525b1d8d572c3 to your computer and use it in GitHub Desktop.
Save oceanapplications/e779873648b0ba2c204525b1d8d572c3 to your computer and use it in GitHub Desktop.
apiVersion: batch/v1
kind: Job
metadata:
name: horizon
namespace: kubernetes-for-laravel
labels:
tier: backend
spec:
parallelism: 1 # used to scale processes
template:
metadata:
labels:
app: horizon
tier: backend
spec:
enableServiceLinks: false
restartPolicy: OnFailure
containers:
- name: horizon
image: s937717/laravel
imagePullPolicy: Always
env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: mysql-password
envFrom:
- configMapRef:
name: laravel-env
command: [ "/bin/sh", "-c", "php /var/www/html/artisan horizon" ]
imagePullSecrets:
- name: regcred
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment