148 lines
3.0 KiB
YAML
148 lines
3.0 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: nginx
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: pigallery2
|
|
namespace: nginx
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: pigallery2
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: pigallery2
|
|
spec:
|
|
containers:
|
|
- name: pigallery2
|
|
image: harbor.onwalk.net/public/pigallery2:latest
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: NODE_ENV
|
|
value: "production"
|
|
ports:
|
|
- containerPort: 80
|
|
volumeMounts:
|
|
- name: config-volume
|
|
mountPath: /app/data/config
|
|
- name: db-volume
|
|
mountPath: /app/data/db
|
|
- name: tmp-volume
|
|
mountPath: /app/data/tmp
|
|
- name: images-volume
|
|
mountPath: /app/data/images
|
|
volumes:
|
|
- name: db-volume
|
|
hostPath:
|
|
path: /data/gallery/db/
|
|
type: Directory
|
|
- name: config-volume
|
|
hostPath:
|
|
path: /data/gallery/config/
|
|
type: Directory
|
|
- name: tmp-volume
|
|
hostPath:
|
|
path: /data/gallery/tmp/
|
|
type: Directory
|
|
- name: images-volume
|
|
hostPath:
|
|
path: /data/gallery/images/
|
|
type: Directory
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: pigallery2
|
|
namespace: nginx
|
|
spec:
|
|
selector:
|
|
app: pigallery2
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/instance: mirrors
|
|
app.kubernetes.io/name: nginx
|
|
name: www-onwalk-net
|
|
namespace: nginx
|
|
spec:
|
|
ingressClassName: nginx
|
|
rules:
|
|
- host: www.onwalk.net
|
|
http:
|
|
paths:
|
|
- backend:
|
|
service:
|
|
name: pigallery2
|
|
port:
|
|
number: 80
|
|
path: /
|
|
pathType: Prefix
|
|
tls:
|
|
- hosts:
|
|
- www.onwalk.net
|
|
secretName: nginx-tls
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/instance: mirrors
|
|
app.kubernetes.io/name: nginx
|
|
name: www-svc-ink
|
|
namespace: nginx
|
|
spec:
|
|
ingressClassName: nginx
|
|
rules:
|
|
- host: www.svc.ink
|
|
http:
|
|
paths:
|
|
- backend:
|
|
service:
|
|
name: photoprism
|
|
port:
|
|
number: 80
|
|
path: /
|
|
pathType: ImplementationSpecific
|
|
tls:
|
|
- hosts:
|
|
- www.svc.ink
|
|
secretName: svc-ink-tls
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/instance: mirrors
|
|
app.kubernetes.io/name: nginx
|
|
name: www-svc-plus
|
|
namespace: nginx
|
|
spec:
|
|
ingressClassName: nginx
|
|
rules:
|
|
- host: www.svc.plus
|
|
http:
|
|
paths:
|
|
- backend:
|
|
service:
|
|
name: photoprism
|
|
port:
|
|
number: 80
|
|
path: /
|
|
pathType: ImplementationSpecific
|
|
tls:
|
|
- hosts:
|
|
- www.svc.plus
|
|
secretName: svc-plus-tls
|