basic deployment of ghost

This commit is contained in:
Remy Moll 2024-09-17 18:48:26 +02:00
commit 2d1a643cb2
6 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,43 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ghost
spec:
replicas: 1
selector:
matchLabels:
app: ghost
template:
metadata:
labels:
app: ghost
spec:
containers:
- name: ghost
image: ghost
ports:
- containerPort: 2368
env:
- name: TZ
value: Europe/Berlin
- name: NODE_ENV
value: development
- name: database__connection__filename
value: /var/lib/ghost/content/data/ghost.db
# - name: url
# value: https://anydev.info
volumeMounts:
- name: data
mountPath: /var/lib/ghost/content/
resources:
requests:
cpu: "100m"
memory: "200Mi"
limits:
cpu: "1"
memory: "500Mi"
volumes:
- name: data
persistentVolumeClaim:
claimName: ghost-data

17
deployment/ingress.yaml Normal file
View File

@ -0,0 +1,17 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: anydev-ingressroute
spec:
entryPoints:
- websecure
routes:
- match: Host(`anydev.info`)
kind: Rule
services:
- name: anydev-web
port: 2368
tls:
certResolver: default-tls

View File

@ -0,0 +1,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- pvc.yaml
- deployment.yaml
- service.yaml
- ingress.yaml
namespace: anydev
images:
- name: ghost
newName: ghost
newTag: "5.94.1"

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: placeholder

11
deployment/pvc.yaml Normal file
View File

@ -0,0 +1,11 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: ghost-data
spec:
storageClassName: "nfs-client"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

10
deployment/service.yaml Normal file
View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: anydev-web
spec:
selector:
app: ghost
ports:
- port: 2368
targetPort: 2368