Skip to content

Instantly share code, notes, and snippets.

@oceanapplications
Created July 22, 2021 00:43
Show Gist options
  • Save oceanapplications/b684308cc8dfedc0c53a84aa66a1d3db to your computer and use it in GitHub Desktop.
Save oceanapplications/b684308cc8dfedc0c53a84aa66a1d3db to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: php
labels:
tier: backend
spec:
replicas: 1
selector:
matchLabels:
app: php
tier: backend
template:
metadata:
labels:
app: php
tier: backend
spec:
enableServiceLinks: false
containers:
- name: php
image: laravel-php
imagePullPolicy: Never
volumeMounts:
- name: code
mountPath: /code
lifecycle:
postStart:
exec:
command: [ "/bin/sh", "-c", "cp -r /var/www/html/. /code" ]
volumes:
- name: code
persistentVolumeClaim:
claimName: code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment