Skip to content

Instantly share code, notes, and snippets.

@revsbech
Last active August 24, 2016 10:44
Show Gist options
  • Save revsbech/358d221396c68cff39f1db854cc8f790 to your computer and use it in GitHub Desktop.
Save revsbech/358d221396c68cff39f1db854cc8f790 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: symfony
annotations:
pod.alpha.kubernetes.io/init-containers: '[{
"name": "install",
"image": "revsbech/symfonydemo",
"command": ["cp", "-a", "/var/www/application", "/app"],
"volumeMounts": [
{
"name": "workdir",
"mountPath": "/app"
}
]
}
]'
spec:
replicas: 1
template:
metadata:
labels:
app: symfony
spec:
containers:
- name: nginx
image: pcodk/nginx
ports:
- containerPort: 80
volumeMounts:
- mountPath: /var/www/application
name: workdir
- name: php
image: pcodk/php7
volumeMounts:
- mountPath: /var/www/application
name: workdir
volumes:
- name: workdir
emptyDir: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment