firefly-iii: Deploy Firefly III

[Firefly III][0] is a free and open source, web-based personal finance
management application.  It features a double-entry bookkeeping system
for tracking transactions, plus other classification options like
budgets, categories, and tags.  It has a rule engine that can
automatically manipulate transactions, plus several other really useful
features.

The application itself is mostly standard browser-based GUI written in
PHP.  There is an official container image, though it is not
particularly well designed and must be run as root (it does drop
privileges before launching the actual application, thankfully).  I may
decide to create a better image later.

Along with the main application, there is a separate tool for importing
transactions from a CSV file.  Its design is rather interesting: though
it is a web-based application, it does not have any authentication or
user management, but uses a user API key to access the main Firefly III
application.  This effectively requires us to have one instance of the
importer per user.  While not ideal, it isn't particularly problematic
since there are only two of us (and Tabitha may not even end up using
it; she seems to like YNAB).

[0]: https://www.firefly-iii.org/
This commit is contained in:
2023-04-30 22:04:12 -05:00
parent ffffe9d3c8
commit 5d5b69a629
11 changed files with 583 additions and 0 deletions

124
firefly-iii/importer.yaml Normal file
View File

@@ -0,0 +1,124 @@
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: firefly-iii-importer
app.kubernetes.io/instance: dustin
app.kubernetes.io/name: firefly-iii-importer-dustin
app.kubernetes.io/part-of: firefly-iii
name: firefly-iii-importer-dustin
spec:
ports:
- port: 8080
name: http
selector:
app.kubernetes.io/component: firefly-iii-importer
app.kubernetes.io/instance: dustin
app.kubernetes.io/name: firefly-iii-importer-dustin
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: firefly-iii-importer
app.kubernetes.io/instance: tabitha
app.kubernetes.io/name: firefly-iii-importer-tabitha
app.kubernetes.io/part-of: firefly-iii
name: firefly-iii-importer-tabitha
spec:
ports:
- port: 8080
name: http
selector:
app.kubernetes.io/component: firefly-iii-importer
app.kubernetes.io/instance: tabitha
app.kubernetes.io/name: firefly-iii-importer-tabitha
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: firefly-iii-importer
app.kubernetes.io/instance: dustin
app.kubernetes.io/name: firefly-iii-importer-dustin
app.kubernetes.io/part-of: firefly-iii
name: firefly-iii-importer-dustin
spec:
selector:
matchLabels:
app.kubernetes.io/component: firefly-iii-importer
app.kubernetes.io/instance: dustin
app.kubernetes.io/name: firefly-iii-importer-dustin
template:
metadata:
labels:
app.kubernetes.io/component: firefly-iii-importer
app.kubernetes.io/instance: dustin
app.kubernetes.io/name: firefly-iii-importer-dustin
app.kubernetes.io/part-of: firefly-iii-importer
spec:
containers:
- name: firefly-iii
image: docker.io/fireflyiii/data-importer:version-1.2.2
envFrom:
- configMapRef:
name: firefly-iii-importer
optional: true
env:
- name: FIREFLY_III_URL
value: http://firefly-iii:8080
- name: FIREFLY_III_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: firefly-iii-importer
key: dustin.access-token
ports:
- containerPort: 8080
name: http
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: firefly-iii-importer
app.kubernetes.io/instance: tabitha
app.kubernetes.io/name: firefly-iii-importer-tabitha
app.kubernetes.io/part-of: firefly-iii
name: firefly-iii-importer-tabitha
spec:
selector:
matchLabels:
app.kubernetes.io/component: firefly-iii-importer
app.kubernetes.io/instance: tabitha
app.kubernetes.io/name: firefly-iii-importer-tabitha
template:
metadata:
labels:
app.kubernetes.io/component: firefly-iii-importer
app.kubernetes.io/instance: tabitha
app.kubernetes.io/name: firefly-iii-importer-tabitha
app.kubernetes.io/part-of: firefly-iii-importer
spec:
containers:
- name: firefly-iii
image: docker.io/fireflyiii/data-importer:version-1.2.2
envFrom:
- configMapRef:
name: firefly-iii-importer
optional: true
env:
- name: FIREFLY_III_URL
value: http://firefly-iii:8080
- name: FIREFLY_III_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: firefly-iii-importer
key: tabitha.access-token
ports:
- containerPort: 8080
name: http