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

View File

@@ -0,0 +1,64 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: firefly-iii
resources:
- redis.yaml
- firefly-iii.yaml
- ingress.yaml
- importer.yaml
- importer-ingress.yaml
configMapGenerator:
- name: firefly-iii
envs:
- firefly-iii.env
options:
disableNameSuffixHash: true
- name: firefly-iii-importer
envs:
- firefly-iii-importer.env
options:
disableNameSuffixHash: true
secretGenerator:
- name: firefly-iii
files:
- app.key
- cron.token
options:
disableNameSuffixHash: true
- name: firefly-iii-importer
files:
- dustin.access-token
- tabitha.access-token
options:
disableNameSuffixHash: true
patches:
# This patch changes the source secret for the PostgreSQL database
# password from the default (`db.password` inside `firefly-iii`) to
# a secret managed by the postgres operator.
- patch: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: firefly-iii
spec:
template:
spec:
containers:
- name: firefly-iii
env:
- name: DB_PASSWORD_FILE
value: /run/secrets/postgresql/password
volumeMounts:
- name: db-secret
mountPath: /run/secrets/postgresql
readOnly: true
volumes:
- name: db-secret
secret:
secretName: firefly-iii.firefly.default.credentials.postgresql.acid.zalan.do
defaultMode: 0440