Last active
April 3, 2024 09:31
-
-
Save sergioska/2f82fcc7a0cf2895ed6deeef8b4fec30 to your computer and use it in GitHub Desktop.
[k8s] deployment nginx/php-fpm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: app | |
name: web | |
namespace: default | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: app | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
app: app | |
spec: | |
containers: | |
- name: sylius-php-fpm | |
image: php-fpm:v4 | |
imagePullPolicy: Never | |
ports: | |
- containerPort: 9000 | |
name: http | |
protocol: TCP | |
volumeMounts: | |
- name: nginx-config-volume | |
mountPath: /etc/nginx/conf.d/default.conf | |
subPath: default.conf | |
- name: www-storage | |
mountPath: /srv/app/ | |
- name: nginx | |
image: nginx:alpine | |
imagePullPolicy: Always | |
ports: | |
- containerPort: 80 | |
name: http | |
protocol: TCP | |
volumeMounts: | |
- name: nginx-config-volume | |
mountPath: /etc/nginx/conf.d/default.conf | |
subPath: default.conf | |
- name: www-storage | |
mountPath: /srv/app/ | |
restartPolicy: Always | |
serviceAccountName: "" | |
volumes: | |
- name: www-storage | |
persistentVolumeClaim: | |
claimName: pv-www-claim | |
- name: nginx-config-volume | |
configMap: | |
name: nginx-config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment