--- # yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.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.5.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.24@sha256:e790307a447f0a546df6bd16421f0b82b38ba2fdea52601d07143a54fd708db4 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.24@sha256:e790307a447f0a546df6bd16421f0b82b38ba2fdea52601d07143a54fd708db4 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: nginxinc/nginx-unprivileged tag: 1.27.3-alpine@sha256:8d20086fe28cc02b51192c61707dda64ce6eaf1d08e47e6a60daa5f8ea9ab3e7 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 gethomepage.dev/enabled: "true" gethomepage.dev/name: Tandoor gethomepage.dev/description: Managing recipes, planned meals, shopping lists. gethomepage.dev/group: Applications gethomepage.dev/icon: tandoor.png gethomepage.dev/pod-selector: >- app in ( tandoor ) 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