diff --git a/blueprints/firefly-iii/README.md b/blueprints/firefly-iii/README.md new file mode 100644 index 00000000..1687baf8 --- /dev/null +++ b/blueprints/firefly-iii/README.md @@ -0,0 +1,13 @@ +# Firefly III + +Firefly III is a self-hosted personal finance manager for budgets, accounts, transactions, categories, and reports. + +This Dokploy template includes: + +- Firefly III core web application +- MariaDB database with generated credentials +- Persistent upload and database volumes +- Daily cron runner using Firefly III's static cron token +- Dokploy domain routing on the application service + +After deployment, open the generated domain and complete the first-user setup flow. diff --git a/blueprints/firefly-iii/docker-compose.yml b/blueprints/firefly-iii/docker-compose.yml new file mode 100644 index 00000000..b9823407 --- /dev/null +++ b/blueprints/firefly-iii/docker-compose.yml @@ -0,0 +1,65 @@ +version: "3.8" + +services: + firefly-iii: + image: fireflyiii/core:version-6.6.3 + restart: unless-stopped + depends_on: + firefly-iii-db: + condition: service_healthy + environment: + APP_KEY: ${APP_KEY} + APP_URL: ${APP_URL} + TRUSTED_PROXIES: "**" + TZ: ${TZ} + SITE_OWNER: ${SITE_OWNER} + DEFAULT_LANGUAGE: ${DEFAULT_LANGUAGE} + DEFAULT_LOCALE: ${DEFAULT_LOCALE} + DB_CONNECTION: mysql + DB_HOST: firefly-iii-db + DB_PORT: 3306 + DB_DATABASE: ${DB_DATABASE} + DB_USERNAME: ${DB_USERNAME} + DB_PASSWORD: ${DB_PASSWORD} + STATIC_CRON_TOKEN: ${STATIC_CRON_TOKEN} + expose: + - "8080" + volumes: + - firefly-iii-upload:/var/www/html/storage/upload + + firefly-iii-db: + image: mariadb:11.8 + restart: unless-stopped + environment: + MYSQL_DATABASE: ${DB_DATABASE} + MYSQL_USER: ${DB_USERNAME} + MYSQL_PASSWORD: ${DB_PASSWORD} + MYSQL_RANDOM_ROOT_PASSWORD: "yes" + volumes: + - firefly-iii-db:/var/lib/mysql + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + interval: 10s + timeout: 5s + retries: 5 + + firefly-iii-cron: + image: alpine:3.22 + restart: unless-stopped + depends_on: + - firefly-iii + environment: + TZ: ${TZ} + STATIC_CRON_TOKEN: ${STATIC_CRON_TOKEN} + command: + - sh + - -c + - | + apk add --no-cache tzdata wget && \ + (ln -snf /usr/share/zoneinfo/$$TZ /etc/localtime || true) && \ + echo "0 3 * * * wget -qO- http://firefly-iii:8080/api/v1/cron/$$STATIC_CRON_TOKEN; echo" | crontab - && \ + crond -f -L /dev/stdout + +volumes: + firefly-iii-upload: {} + firefly-iii-db: {} diff --git a/blueprints/firefly-iii/logo.svg b/blueprints/firefly-iii/logo.svg new file mode 100644 index 00000000..8b4b7d2c --- /dev/null +++ b/blueprints/firefly-iii/logo.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/blueprints/firefly-iii/template.toml b/blueprints/firefly-iii/template.toml new file mode 100644 index 00000000..3f02a8ae --- /dev/null +++ b/blueprints/firefly-iii/template.toml @@ -0,0 +1,36 @@ +[variables] +main_domain = "${domain}" +app_key = "${base64:32}" +db_name = "firefly" +db_user = "firefly" +db_password = "${password:32}" +cron_token = "${hash:32}" +site_owner = "${email}" +timezone = "UTC" +default_language = "en_US" +default_locale = "equal" + +[config] +env = [ + "APP_KEY=base64:${app_key}", + "APP_URL=https://${main_domain}", + "TRUSTED_PROXIES=**", + "TZ=${timezone}", + "SITE_OWNER=${site_owner}", + "DEFAULT_LANGUAGE=${default_language}", + "DEFAULT_LOCALE=${default_locale}", + "DB_DATABASE=${db_name}", + "DB_USERNAME=${db_user}", + "DB_PASSWORD=${db_password}", + "STATIC_CRON_TOKEN=${cron_token}", + "MYSQL_DATABASE=${db_name}", + "MYSQL_USER=${db_user}", + "MYSQL_PASSWORD=${db_password}", + "MYSQL_RANDOM_ROOT_PASSWORD=yes" +] +mounts = [] + +[[config.domains]] +serviceName = "firefly-iii" +port = 8080 +host = "${main_domain}" diff --git a/meta.json b/meta.json index 83496f3b..f1dbb9fe 100644 --- a/meta.json +++ b/meta.json @@ -2414,6 +2414,23 @@ "llm" ] }, + { + "id": "firefly-iii", + "name": "Firefly III", + "version": "6.6.3", + "description": "Firefly III is a self-hosted personal finance manager for tracking expenses, budgets, accounts, and financial reports.", + "logo": "logo.svg", + "links": { + "github": "https://github.com/firefly-iii/firefly-iii", + "website": "https://www.firefly-iii.org/", + "docs": "https://docs.firefly-iii.org/" + }, + "tags": [ + "finance", + "budgeting", + "self-hosted" + ] + }, { "id": "fivem", "name": "FiveM Server",