firefly iii

main
Alpha Chen 1 year ago
parent 5808ed502f
commit 8ab3b4fee7
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -0,0 +1,65 @@
# https://docs.firefly-iii.org/firefly-iii/installation/docker/#straight-from-docker-hub
- name: Set up Firefly III
hosts: lotus-land-story
vars_files:
- vars.yml
tasks:
- name: Create directories for volume mounting
ansible.builtin.file:
path: /mnt/lotus-land-story/firefly-iii/{{ item }}
state: directory
mode: "0755"
loop:
- upload
- database
- name: Get docker network
community.docker.docker_network:
name: lotus_land_story
register: docker_network
- name: Run Firefly III
community.docker.docker_container:
restart: true
name: firefly-iii
image: fireflyiii/core:version-6.0.22
env:
APP_KEY: "{{ firefly_iii.app_key }}"
APP_URL: https://{{ firefly_iii.subdomain }}.{{ domain }}
TRUSTED_PROXIES: "**" # TODO Set this to caddy?
DB_CONNECTION: sqlite
STATIC_CRON_TOKEN: "{{ firefly_iii.static_cron_token }}"
MAIL_MAILER: smtp
MAIL_HOST: smtp.sendgrid.net
MAIL_PORT: "465"
MAIL_FROM: money@{{ domain }}
MAIL_USERNAME: apikey
MAIL_PASSWORD: "{{ firefly_iii.mail_password }}"
MAIL_ENCRYPTION: "true"
volumes:
- /mnt/lotus-land-story/firefly-iii/upload:/var/www/html/storage/upload
- /mnt/lotus-land-story/firefly-iii/database:/var/www/html/storage/database
restart_policy: unless-stopped
networks:
- name: lotus_land_story
- name: Run Firefly III cron trigger
community.docker.docker_container:
restart: true
name: firefly-iii-cron
image: alpine
command: >
sh -c
"echo \"0 3 * * * wget -qO- http://firefly-iii:8080/api/v1/cron/{{ firefly_iii.static_cron_token }}\"
| crontab - && crond -f -L /dev/stdout"
restart_policy: unless-stopped
networks:
- name: lotus_land_story
handlers:
- name: Import restarts
ansible.builtin.import_tasks: restarts.yml
# vim: ft=yaml.ansible

@ -100,6 +100,7 @@
- import_playbook: loki.yml # noqa: name[play]
- import_playbook: miniflux.yml # noqa: name[play]
- import_playbook: woodpecker.yml # noqa: name[play]
- import_playbook: firefly-iii.yml # noqa: name[play]
- import_playbook: caddy.yml # noqa: name[play]

@ -55,7 +55,7 @@
community.docker.docker_container:
restart: true
name: miniflux
image: miniflux/miniflux:{{ miniflux.version }}
image: miniflux/miniflux:2.0.47
env:
DATABASE_URL: postgres://miniflux:{{ miniflux.db_password }}@host.docker.internal/miniflux
RUN_MIGRATIONS: "1"

@ -25,3 +25,7 @@ ci.{{ domain }} {
woodpecker.{{ domain }} {
reverse_proxy woodpecker-server:8000
}
{{ firefly_iii.subdomain }}.{{ domain }} {
reverse_proxy firefly-iii:8080
}

Loading…
Cancel
Save