save recipes
This commit is contained in:
parent
24787d7bf7
commit
90e8920d62
1 changed files with 69 additions and 13 deletions
|
|
@ -1,11 +1,33 @@
|
||||||
# ======================================================
|
# ======================================================
|
||||||
# TANDOOR RECIPES - FULL STACK
|
# TANDOOR RECIPES - PRODUCTION (PINNED TO MIST)
|
||||||
# Domain: recipes.juntekim.com
|
|
||||||
# ======================================================
|
# ======================================================
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# POSTGRES PVC
|
# POSTGRES PV
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: tandoor-postgres-pv
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 2Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: tandoor-local-storage
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
local:
|
||||||
|
path: /home/kimjunte/k8s_storage/tandoor/postgres
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- mist
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
|
|
@ -14,14 +36,37 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
storageClassName: microk8s-hostpath
|
storageClassName: tandoor-local-storage
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 2Gi
|
storage: 2Gi
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# MEDIA PVC
|
# MEDIA PV
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: tandoor-media-pv
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 5Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: tandoor-local-storage
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
local:
|
||||||
|
path: /home/kimjunte/k8s_storage/tandoor/media
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- mist
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
|
|
@ -30,7 +75,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
storageClassName: microk8s-hostpath
|
storageClassName: tandoor-local-storage
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 5Gi
|
storage: 5Gi
|
||||||
|
|
@ -43,6 +88,8 @@ apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: tandoor-postgres
|
name: tandoor-postgres
|
||||||
|
labels:
|
||||||
|
app: tandoor-postgres
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
|
|
@ -53,6 +100,8 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: tandoor-postgres
|
app: tandoor-postgres
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/hostname: mist
|
||||||
containers:
|
containers:
|
||||||
- name: postgres
|
- name: postgres
|
||||||
image: postgres:15-alpine
|
image: postgres:15-alpine
|
||||||
|
|
@ -90,6 +139,8 @@ apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: tandoor-redis
|
name: tandoor-redis
|
||||||
|
labels:
|
||||||
|
app: tandoor-redis
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
|
|
@ -100,6 +151,8 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: tandoor-redis
|
app: tandoor-redis
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/hostname: mist
|
||||||
containers:
|
containers:
|
||||||
- name: redis
|
- name: redis
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
|
|
@ -125,6 +178,8 @@ apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: tandoor
|
name: tandoor
|
||||||
|
labels:
|
||||||
|
app: tandoor
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
|
|
@ -135,12 +190,14 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: tandoor
|
app: tandoor
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/hostname: mist
|
||||||
containers:
|
containers:
|
||||||
- name: tandoor
|
- name: tandoor
|
||||||
image: vabene1111/recipes:latest
|
image: vabene1111/recipes:latest
|
||||||
env:
|
env:
|
||||||
- name: SECRET_KEY
|
- name: SECRET_KEY
|
||||||
value: replace-with-random-secret
|
value: replace-with-very-long-random-string
|
||||||
- name: DB_ENGINE
|
- name: DB_ENGINE
|
||||||
value: django.db.backends.postgresql
|
value: django.db.backends.postgresql
|
||||||
- name: POSTGRES_HOST
|
- name: POSTGRES_HOST
|
||||||
|
|
@ -180,7 +237,7 @@ spec:
|
||||||
selector:
|
selector:
|
||||||
app: tandoor
|
app: tandoor
|
||||||
ports:
|
ports:
|
||||||
- port: 8080
|
- port: 80
|
||||||
targetPort: 8080
|
targetPort: 8080
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
@ -195,12 +252,11 @@ spec:
|
||||||
entryPoints:
|
entryPoints:
|
||||||
- websecure
|
- websecure
|
||||||
routes:
|
routes:
|
||||||
- match: Host(`recipes.juntekim.com`)
|
- match: Host(`mealcraft.com`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
services:
|
services:
|
||||||
- name: tandoor
|
- name: tandoor
|
||||||
port: 8080
|
port: 80
|
||||||
|
passHostHeader: true
|
||||||
tls:
|
tls:
|
||||||
certResolver: myresolver
|
certResolver: myresolver
|
||||||
domains:
|
|
||||||
- main: recipes.juntekim.com
|
|
||||||
Loading…
Add table
Reference in a new issue