mirror of
https://github.com/auricom/home-cluster.git
synced 2025-09-17 18:24:14 +02:00
171 lines
4.7 KiB
YAML
171 lines
4.7 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
|
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
kind: HelmRelease
|
|
metadata:
|
|
name: &app tandoor
|
|
namespace: &ns default
|
|
spec:
|
|
interval: 30m
|
|
chart:
|
|
spec:
|
|
chart: app-template
|
|
version: 3.2.1
|
|
sourceRef:
|
|
kind: HelmRepository
|
|
name: bjw-s
|
|
namespace: flux-system
|
|
maxHistory: 2
|
|
install:
|
|
createNamespace: true
|
|
remediation:
|
|
retries: 3
|
|
upgrade:
|
|
cleanupOnFail: true
|
|
remediation:
|
|
retries: 3
|
|
uninstall:
|
|
keepHistory: false
|
|
values:
|
|
defaultPodOptions:
|
|
enableServiceLinks: false
|
|
securityContext:
|
|
runAsUser: 568
|
|
runAsGroup: 568
|
|
controllers:
|
|
tandoor:
|
|
annotations:
|
|
reloader.stakater.com/auto: "true"
|
|
initContainers:
|
|
init-db:
|
|
image:
|
|
repository: ghcr.io/onedr0p/postgres-init
|
|
tag: 16
|
|
envFrom: &envFrom
|
|
- secretRef:
|
|
name: tandoor-secret
|
|
migrations:
|
|
image:
|
|
repository: vabene1111/recipes
|
|
tag: 1.5.17@sha256:18424a56c1f3e6e0e8b2950fa0d2f042074bcc8e4aed6bcd1847539f28f5b320
|
|
envFrom: *envFrom
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
set -e
|
|
source /opt/recipes/venv/bin/activate
|
|
echo "Updating database"
|
|
python3 /opt/recipes/manage.py migrate
|
|
python3 /opt/recipes/manage.py collectstatic_js_reverse
|
|
python3 /opt/recipes/manage.py collectstatic --noinput
|
|
containers:
|
|
app:
|
|
image:
|
|
repository: vabene1111/recipes
|
|
tag: 1.5.17@sha256:18424a56c1f3e6e0e8b2950fa0d2f042074bcc8e4aed6bcd1847539f28f5b320
|
|
envFrom: *envFrom
|
|
env:
|
|
DEBUG: "0"
|
|
ALLOWED_HOSTS: "*"
|
|
GUNICORN_MEDIA: "0"
|
|
TZ: ${TIMEZONE}
|
|
TANDOOR_PORT: &port 8888
|
|
FRACTION_PREF_DEFAULT: "0"
|
|
COMMENT_PREF_DEFAULT: "1"
|
|
SHOPPING_MIN_AUTOSYNC_INTERVAL: "5"
|
|
command:
|
|
- /opt/recipes/venv/bin/gunicorn
|
|
- -b
|
|
- :8888
|
|
- --access-logfile
|
|
- "-"
|
|
- --error-logfile
|
|
- "-"
|
|
- --log-level
|
|
- INFO
|
|
- recipes.wsgi
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
memory: 512Mi
|
|
nginx:
|
|
image:
|
|
repository: ghcr.io/nginxinc/nginx-unprivileged
|
|
tag: 1.27.0-alpine@sha256:2de52e9bfe6edbcaa09fac04b2987dd444e97c359f6b2faf5001b507c27d5bf8
|
|
service:
|
|
app:
|
|
controller: *app
|
|
ports:
|
|
http:
|
|
port: *port
|
|
nginx:
|
|
port: &port2 8080
|
|
ingress:
|
|
app:
|
|
enabled: true
|
|
className: nginx
|
|
annotations:
|
|
hajimari.io/icon: mdi:chef-hat
|
|
hosts:
|
|
- host: &host "{{ .Release.Name }}.${SECRET_EXTERNAL_DOMAIN}"
|
|
paths:
|
|
- path: /
|
|
service:
|
|
identifier: app
|
|
port: http
|
|
- path: /media
|
|
service:
|
|
identifier: app
|
|
port: *port2
|
|
- path: /static
|
|
service:
|
|
identifier: app
|
|
port: *port2
|
|
tls:
|
|
- hosts:
|
|
- *host
|
|
persistence:
|
|
config:
|
|
existingClaim: *app
|
|
advancedMounts:
|
|
tandoor:
|
|
app:
|
|
- path: /opt/recipes/mediafiles
|
|
nginx:
|
|
- path: /media
|
|
nginx-config:
|
|
type: configMap
|
|
name: tandoor-configmap
|
|
advancedMounts:
|
|
tandoor:
|
|
nginx:
|
|
- path: /etc/nginx/nginx.conf
|
|
subPath: nginx-config
|
|
django-js-reverse:
|
|
type: emptyDir
|
|
advancedMounts:
|
|
tandoor:
|
|
app:
|
|
- path: /opt/recipes/cookbook/static/django_js_reverse
|
|
migrations:
|
|
- path: /opt/recipes/cookbook/static/django_js_reverse
|
|
static:
|
|
type: emptyDir
|
|
advancedMounts:
|
|
tandoor:
|
|
app:
|
|
- path: /opt/recipes/staticfiles
|
|
nginx:
|
|
- path: /static
|
|
migrations:
|
|
- path: /opt/recipes/staticfiles
|
|
cache:
|
|
type: emptyDir
|
|
advancedMounts:
|
|
tandoor:
|
|
nginx:
|
|
- path: /var/cache/nginx
|