From 8a2539e52777acac1edd0f7736176449a3541a21 Mon Sep 17 00:00:00 2001 From: Paul Payne Date: Fri, 19 Jun 2026 21:33:01 +0000 Subject: [PATCH] Adds firefly-iii app. --- firefly-iii/app.yaml | 5 ++ firefly-iii/versions/6/README.md | 34 ++++++++ firefly-iii/versions/6/db-init-job.yaml | 61 ++++++++++++++ firefly-iii/versions/6/deployment.yaml | 97 +++++++++++++++++++++++ firefly-iii/versions/6/ingress.yaml | 26 ++++++ firefly-iii/versions/6/kustomization.yaml | 16 ++++ firefly-iii/versions/6/manifest.yaml | 21 +++++ firefly-iii/versions/6/namespace.yaml | 4 + firefly-iii/versions/6/pvc.yaml | 11 +++ firefly-iii/versions/6/service.yaml | 13 +++ 10 files changed, 288 insertions(+) create mode 100644 firefly-iii/app.yaml create mode 100644 firefly-iii/versions/6/README.md create mode 100644 firefly-iii/versions/6/db-init-job.yaml create mode 100644 firefly-iii/versions/6/deployment.yaml create mode 100644 firefly-iii/versions/6/ingress.yaml create mode 100644 firefly-iii/versions/6/kustomization.yaml create mode 100644 firefly-iii/versions/6/manifest.yaml create mode 100644 firefly-iii/versions/6/namespace.yaml create mode 100644 firefly-iii/versions/6/pvc.yaml create mode 100644 firefly-iii/versions/6/service.yaml diff --git a/firefly-iii/app.yaml b/firefly-iii/app.yaml new file mode 100644 index 0000000..d39b9ce --- /dev/null +++ b/firefly-iii/app.yaml @@ -0,0 +1,5 @@ +name: firefly-iii +is: firefly-iii +description: Firefly III is a self-hosted personal finance manager that helps you track income, expenses, and budgets with double-entry bookkeeping. +icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/firefly-iii.svg +latest: "6" diff --git a/firefly-iii/versions/6/README.md b/firefly-iii/versions/6/README.md new file mode 100644 index 0000000..55af583 --- /dev/null +++ b/firefly-iii/versions/6/README.md @@ -0,0 +1,34 @@ +# Firefly III + +Firefly III is a self-hosted personal finance manager for tracking income, expenses, and budgets. + +## Dependencies + +- **PostgreSQL** - Database for storing financial data + +## Configuration + +Key settings in `config.yaml`: + +- **domain** - Where Firefly III will be accessible +- **storage** - Persistent volume size (default: `1Gi`) +- **timezone** - Timezone for date handling (default: `UTC`) +- **adminEmail** - Admin email address (defaults to your operator email) +- **db.name** - Database name (default: `fireflyiii`) + +## First-Time Setup + +1. Add and deploy the app: + ```bash + wild app add firefly-iii + wild app deploy firefly-iii + ``` + +2. Visit the app URL and complete the registration form to create your admin account. + +3. After logging in, set up your accounts, budgets, and categories from the dashboard. + +## Notes + +- The `appKey` secret is auto-generated and used for encryption — do not change it after data has been entered +- SMTP is not required but can be configured in Firefly III's own settings after login diff --git a/firefly-iii/versions/6/db-init-job.yaml b/firefly-iii/versions/6/db-init-job.yaml new file mode 100644 index 0000000..74695c2 --- /dev/null +++ b/firefly-iii/versions/6/db-init-job.yaml @@ -0,0 +1,61 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: firefly-iii-db-init + labels: + component: db-init +spec: + template: + metadata: + labels: + component: db-init + spec: + restartPolicy: OnFailure + securityContext: + runAsNonRoot: true + runAsUser: 999 + runAsGroup: 999 + seccompProfile: + type: RuntimeDefault + containers: + - name: postgres-init + image: postgres:15 + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: false + env: + - name: PGHOST + value: {{ .db.host }} + - name: PGUSER + value: postgres + - name: PGPASSWORD + valueFrom: + secretKeyRef: + name: firefly-iii-secrets + key: postgres.password + - name: DB_NAME + value: {{ .db.name }} + - name: DB_USER + value: {{ .db.user }} + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: firefly-iii-secrets + key: dbPassword + command: + - /bin/bash + - -c + - | + set -e + echo "Waiting for PostgreSQL..." + until pg_isready; do sleep 2; done + echo "Creating database and user for Firefly III..." + psql -c "CREATE DATABASE ${DB_NAME};" || echo "Database already exists" + psql -c "CREATE USER ${DB_USER} WITH PASSWORD '${DB_PASSWORD}';" || echo "User already exists" + psql -c "ALTER USER ${DB_USER} WITH PASSWORD '${DB_PASSWORD}';" + psql -c "GRANT ALL PRIVILEGES ON DATABASE ${DB_NAME} TO ${DB_USER};" + psql -d ${DB_NAME} -c "GRANT ALL ON SCHEMA public TO ${DB_USER};" + echo "Done" diff --git a/firefly-iii/versions/6/deployment.yaml b/firefly-iii/versions/6/deployment.yaml new file mode 100644 index 0000000..4c2865c --- /dev/null +++ b/firefly-iii/versions/6/deployment.yaml @@ -0,0 +1,97 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: firefly-iii + namespace: firefly-iii +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + component: web + template: + metadata: + labels: + component: web + spec: + securityContext: + seccompProfile: + type: RuntimeDefault + containers: + - name: firefly-iii + image: fireflyiii/core:version-6.6.3 + ports: + - name: http + containerPort: 8080 + protocol: TCP + env: + - name: APP_ENV + value: production + - name: APP_KEY + valueFrom: + secretKeyRef: + name: firefly-iii-secrets + key: appKey + - name: APP_URL + value: https://{{ .domain }} + - name: SITE_OWNER + value: {{ .adminEmail }} + - name: TZ + value: {{ .timezone }} + - name: DB_CONNECTION + value: pgsql + - name: DB_HOST + value: {{ .db.host }} + - name: DB_PORT + value: "{{ .db.port }}" + - name: DB_DATABASE + value: {{ .db.name }} + - name: DB_USERNAME + value: {{ .db.user }} + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: firefly-iii-secrets + key: dbPassword + - name: TRUSTED_PROXIES + value: "**" + resources: + limits: + cpu: 500m + ephemeral-storage: 1Gi + memory: 512Mi + requests: + cpu: 50m + ephemeral-storage: 50Mi + memory: 256Mi + volumeMounts: + - name: firefly-iii-upload + mountPath: /var/www/html/storage/upload + livenessProbe: + httpGet: + path: /health + port: 8080 + initialDelaySeconds: 60 + timeoutSeconds: 5 + periodSeconds: 15 + failureThreshold: 6 + readinessProbe: + httpGet: + path: /health + port: 8080 + initialDelaySeconds: 30 + timeoutSeconds: 3 + periodSeconds: 10 + failureThreshold: 3 + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: false + volumes: + - name: firefly-iii-upload + persistentVolumeClaim: + claimName: firefly-iii-upload + restartPolicy: Always diff --git a/firefly-iii/versions/6/ingress.yaml b/firefly-iii/versions/6/ingress.yaml new file mode 100644 index 0000000..41b8b07 --- /dev/null +++ b/firefly-iii/versions/6/ingress.yaml @@ -0,0 +1,26 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: firefly-iii + namespace: firefly-iii + annotations: + external-dns.alpha.kubernetes.io/target: {{ .externalDnsDomain }} + external-dns.alpha.kubernetes.io/cloudflare-proxied: "false" + external-dns.alpha.kubernetes.io/ttl: "60" +spec: + ingressClassName: traefik + rules: + - host: {{ .domain }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: firefly-iii + port: + number: 80 + tls: + - hosts: + - {{ .domain }} + secretName: {{ .tlsSecretName }} diff --git a/firefly-iii/versions/6/kustomization.yaml b/firefly-iii/versions/6/kustomization.yaml new file mode 100644 index 0000000..cc4877b --- /dev/null +++ b/firefly-iii/versions/6/kustomization.yaml @@ -0,0 +1,16 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: firefly-iii +labels: + - includeSelectors: true + pairs: + app: firefly-iii + managedBy: kustomize + partOf: wild-cloud +resources: + - namespace.yaml + - db-init-job.yaml + - deployment.yaml + - service.yaml + - ingress.yaml + - pvc.yaml diff --git a/firefly-iii/versions/6/manifest.yaml b/firefly-iii/versions/6/manifest.yaml new file mode 100644 index 0000000..89a764b --- /dev/null +++ b/firefly-iii/versions/6/manifest.yaml @@ -0,0 +1,21 @@ +version: 6.6.3-1 +requires: + - name: postgres +defaultConfig: + namespace: firefly-iii + externalDnsDomain: '{{ .cloud.domain }}' + domain: firefly-iii.{{ .cloud.domain }} + tlsSecretName: wildcard-wild-cloud-tls + storage: 1Gi + timezone: UTC + adminEmail: '{{ .operator.email }}' + db: + host: '{{ .apps.postgres.host }}' + port: '{{ .apps.postgres.port }}' + name: fireflyiii + user: fireflyiii +defaultSecrets: + - key: appKey + - key: dbPassword +requiredSecrets: + - postgres.password diff --git a/firefly-iii/versions/6/namespace.yaml b/firefly-iii/versions/6/namespace.yaml new file mode 100644 index 0000000..140e5e1 --- /dev/null +++ b/firefly-iii/versions/6/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: firefly-iii diff --git a/firefly-iii/versions/6/pvc.yaml b/firefly-iii/versions/6/pvc.yaml new file mode 100644 index 0000000..5764b8a --- /dev/null +++ b/firefly-iii/versions/6/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: firefly-iii-upload + namespace: firefly-iii +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .storage }} diff --git a/firefly-iii/versions/6/service.yaml b/firefly-iii/versions/6/service.yaml new file mode 100644 index 0000000..fb7c5b8 --- /dev/null +++ b/firefly-iii/versions/6/service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: firefly-iii + namespace: firefly-iii +spec: + selector: + component: web + ports: + - name: http + port: 80 + targetPort: 8080 + protocol: TCP