Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- apiVersion: v1
- kind: Template
- metadata:
- name: sample-phpinfo
- annotations:
- description: Sample PHPinfo APP
- iconClass: icon-web
- tags: "phpinfo,php,nginx,fpm"
- objects:
- - kind: Route
- apiVersion: v1
- metadata:
- name: "sample-phpinfo-${SERVICE_NAME}"
- spec:
- host: "${PUBLIC_DOMAIN}"
- to:
- kind: Service
- name: "nginx-${SERVICE_NAME}"
- - kind: Service
- apiVersion: v1
- metadata:
- name: "nginx-${SERVICE_NAME}"
- spec:
- ports:
- - name: http
- protocol: TCP
- port: 80
- targetPort: 80
- nodePort: 0
- selector:
- name: "nginx-${SERVICE_NAME}"
- portalIP: ''
- type: 'ClusterIP'
- sessionAffinity: None
- status:
- loadBalancer: {}
- - kind: Service
- apiVersion: v1
- metadata:
- name: "phpfpm-${SERVICE_NAME}"
- spec:
- ports:
- - name: phpfpm
- protocol: TCP
- port: 9000
- targetPort: 9000
- nodePort: 0
- selector:
- name: "phpfpm-${SERVICE_NAME}"
- portalIP: ''
- type: 'ClusterIP'
- sessionAffinity: None
- status:
- loadBalancer: {}
- - kind: DeploymentConfig
- apiVersion: v1
- metadata:
- name: "nginx-${SERVICE_NAME}"
- annotations:
- description: 'Defines how to deploy nginx front stack'
- spec:
- strategy:
- type: Rolling
- replicas: 1
- selector:
- name: "nginx-${SERVICE_NAME}"
- template:
- metadata:
- name: "nginx-${SERVICE_NAME}"
- labels:
- name: "nginx-${SERVICE_NAME}"
- spec:
- volumes: []
- containers:
- - name: "nginx-${SERVICE_NAME}"
- imagePullPolicy: 'Always'
- image: "docker.io/fvillain/nginx-phpfpm-proxy"
- ports:
- - containerPort: 80
- env:
- - name: 'FORWARD_TO'
- value: 'phpfpm-${SERVICE_NAME}'
- - name: 'FORWARD_PORT'
- value: '9000'
- - kind: DeploymentConfig
- apiVersion: v1
- metadata:
- name: "phpfpm-${SERVICE_NAME}"
- annotations:
- description: How to deploy the PHP App
- spec:
- strategy:
- type: Rolling
- replicas: 1
- selector:
- name: "phpfpm-${SERVICE_NAME}"
- template:
- metadata:
- name: "phpfpm-${SERVICE_NAME}"
- labels:
- name: "phpfpm-${SERVICE_NAME}"
- spec:
- volumes: []
- containers:
- - name: "phpfpm-${SERVICE_NAME}"
- imagePullPolicy: 'Always'
- image: "test/sample-phpinfo:latest"
- ports:
- - containerPort: 9000
- env: []
- readinessProbe:
- timeoutSeconds: 1
- initialDelaySeconds: 5
- tcpSocket:
- port: 9000
- livenessProbe:
- timeoutSeconds: 1
- initialDelaySeconds: 5
- tcpSocket:
- port: 9000
- parameters:
- - name: PUBLIC_DOMAIN
- description: Public DNS to access the service
- value: ""
- required: false
- - name: SERVICE_NAME
- description: Nginx service name
- from: "phpinfo-app-[0-9]{1}"
- generate: expression
- required: true
- labels:
- template: sample-phpinfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement