parent
5808ed502f
commit
8ab3b4fee7
@ -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
|
Loading…
Reference in new issue