Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d2dde9d27 | ||
|
|
2d9dd339d0 | ||
|
|
0b62da643d |
15
README.md
15
README.md
@ -1,2 +1,15 @@
|
|||||||
# pigallery2-k8s
|
Default user: admin/admin
|
||||||
|
|
||||||
|
Choix d'utiliser mysql:
|
||||||
|
https://github.com/bpatrik/pigallery2 (SQL database and no-database mode)
|
||||||
|
MySQL: permet plus d'options de recherche
|
||||||
|
|
||||||
|
Mais pour commencer on va utiliser sqlite :)
|
||||||
|
|
||||||
|
Comment reproduire:
|
||||||
|
#wget https://raw.githubusercontent.com/bpatrik/pigallery2/master/docker/docker-compose/with-mysql/docker-compose.yml
|
||||||
|
wget https://raw.githubusercontent.com/bpatrik/pigallery2/master/docker/docker-compose/pigallery2-only/docker-compose.yml
|
||||||
|
# remove local path and use config:, images:,tmp: + champs volume à adapter
|
||||||
|
kompose convert
|
||||||
|
#rm nginx*
|
||||||
|
+ tuning
|
||||||
|
|||||||
14
config-persistentvolumeclaim.yaml
Normal file
14
config-persistentvolumeclaim.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: config
|
||||||
|
name: config
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
||||||
14
db-data-persistentvolumeclaim.yaml
Normal file
14
db-data-persistentvolumeclaim.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: db-data
|
||||||
|
name: db-data
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
||||||
14
images-persistentvolumeclaim.yaml
Normal file
14
images-persistentvolumeclaim.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: images
|
||||||
|
name: images
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
||||||
25
ingress.yml
Normal file
25
ingress.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: "pigallery2-ingress"
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "traefik"
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: "web,websecure"
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
spec:
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- "npics.opti.cabillot.eu"
|
||||||
|
secretName: "npicscabilloteu-tls"
|
||||||
|
rules:
|
||||||
|
- host: "npics.opti.cabillot.eu"
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: "/"
|
||||||
|
pathType: "Prefix"
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: "pigallery2"
|
||||||
|
port:
|
||||||
|
name: "http"
|
||||||
11
kustomization.yaml
Normal file
11
kustomization.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- config-persistentvolumeclaim.yaml
|
||||||
|
- db-data-persistentvolumeclaim.yaml
|
||||||
|
- images-persistentvolumeclaim.yaml
|
||||||
|
- ingress.yml
|
||||||
|
- pigallery2-deployment.yaml
|
||||||
|
- pigallery2-service.yaml
|
||||||
|
- tmp-persistentvolumeclaim.yaml
|
||||||
54
pigallery2-deployment.yaml
Normal file
54
pigallery2-deployment.yaml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: "pigallery2"
|
||||||
|
labels:
|
||||||
|
io.kompose.service: pigallery2
|
||||||
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: pigallery2
|
||||||
|
app: "pigallery2"
|
||||||
|
spec:
|
||||||
|
automountServiceAccountToken: false
|
||||||
|
containers:
|
||||||
|
- name: "pigallery2"
|
||||||
|
image: "bpatrik/pigallery2:latest-debian-buster"
|
||||||
|
env:
|
||||||
|
- name: NODE_ENV
|
||||||
|
value: production
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
resources: {}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /app/data/config
|
||||||
|
name: config
|
||||||
|
- mountPath: /app/data/db
|
||||||
|
name: db-data
|
||||||
|
- name: "images"
|
||||||
|
mountPath: "/app/data/images"
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /app/data/tmp
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: config
|
||||||
|
- name: db-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: db-data
|
||||||
|
- name: "images"
|
||||||
|
nfs:
|
||||||
|
server: "odroidhc2.local"
|
||||||
|
path: "/mnt/photos_sanitized"
|
||||||
|
readOnly: true
|
||||||
|
- name: tmp
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: tmp
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: "pigallery2"
|
||||||
15
pigallery2-service.yaml
Normal file
15
pigallery2-service.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: pigallery2
|
||||||
|
name: pigallery2
|
||||||
|
spec:
|
||||||
|
type: "ClusterIP"
|
||||||
|
ports:
|
||||||
|
- name: "http"
|
||||||
|
port: 80
|
||||||
|
protocol: "TCP"
|
||||||
|
targetPort: 80
|
||||||
|
selector:
|
||||||
|
app: "pigallery2"
|
||||||
14
tmp-persistentvolumeclaim.yaml
Normal file
14
tmp-persistentvolumeclaim.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: tmp
|
||||||
|
name: tmp
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
||||||
Loading…
x
Reference in New Issue
Block a user