added recipes
This commit is contained in:
parent
06d5202926
commit
24787d7bf7
1 changed files with 206 additions and 0 deletions
206
recipes/recipes.yaml
Normal file
206
recipes/recipes.yaml
Normal file
|
|
@ -0,0 +1,206 @@
|
|||
# ======================================================
|
||||
# TANDOOR RECIPES - FULL STACK
|
||||
# Domain: recipes.juntekim.com
|
||||
# ======================================================
|
||||
|
||||
# -------------------------
|
||||
# POSTGRES PVC
|
||||
# -------------------------
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: tandoor-postgres-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: microk8s-hostpath
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
|
||||
# -------------------------
|
||||
# MEDIA PVC
|
||||
# -------------------------
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: tandoor-media-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: microk8s-hostpath
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
|
||||
# -------------------------
|
||||
# POSTGRES
|
||||
# -------------------------
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: tandoor-postgres
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tandoor-postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: tandoor-postgres
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:15-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: tandoor
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: tandoorpassword
|
||||
- name: POSTGRES_DB
|
||||
value: tandoor
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql/data
|
||||
name: postgres-storage
|
||||
volumes:
|
||||
- name: postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: tandoor-postgres-pvc
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: tandoor-postgres
|
||||
spec:
|
||||
selector:
|
||||
app: tandoor-postgres
|
||||
ports:
|
||||
- port: 5432
|
||||
|
||||
# -------------------------
|
||||
# REDIS
|
||||
# -------------------------
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: tandoor-redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tandoor-redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: tandoor-redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: tandoor-redis
|
||||
spec:
|
||||
selector:
|
||||
app: tandoor-redis
|
||||
ports:
|
||||
- port: 6379
|
||||
|
||||
# -------------------------
|
||||
# TANDOOR APP
|
||||
# -------------------------
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: tandoor
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tandoor
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: tandoor
|
||||
spec:
|
||||
containers:
|
||||
- name: tandoor
|
||||
image: vabene1111/recipes:latest
|
||||
env:
|
||||
- name: SECRET_KEY
|
||||
value: replace-with-random-secret
|
||||
- name: DB_ENGINE
|
||||
value: django.db.backends.postgresql
|
||||
- name: POSTGRES_HOST
|
||||
value: tandoor-postgres
|
||||
- name: POSTGRES_PORT
|
||||
value: "5432"
|
||||
- name: POSTGRES_USER
|
||||
value: tandoor
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: tandoorpassword
|
||||
- name: POSTGRES_DB
|
||||
value: tandoor
|
||||
- name: REDIS_HOST
|
||||
value: tandoor-redis
|
||||
- name: REDIS_PORT
|
||||
value: "6379"
|
||||
- name: ALLOWED_HOSTS
|
||||
value: recipes.juntekim.com
|
||||
- name: DEBUG
|
||||
value: "0"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: media-storage
|
||||
mountPath: /opt/recipes/mediafiles
|
||||
volumes:
|
||||
- name: media-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: tandoor-media-pvc
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: tandoor
|
||||
spec:
|
||||
selector:
|
||||
app: tandoor
|
||||
ports:
|
||||
- port: 8080
|
||||
targetPort: 8080
|
||||
|
||||
# -------------------------
|
||||
# TRAEFIK INGRESS
|
||||
# -------------------------
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: tandoor-ingress
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`recipes.juntekim.com`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: tandoor
|
||||
port: 8080
|
||||
tls:
|
||||
certResolver: myresolver
|
||||
domains:
|
||||
- main: recipes.juntekim.com
|
||||
Loading…
Add table
Reference in a new issue