You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.1 KiB
68 lines
2.1 KiB
# 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:
|
|
name: firefly-iii
|
|
image: fireflyiii/core:version-6.0.22
|
|
state: absent
|
|
restart: true
|
|
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:
|
|
name: firefly-iii-cron
|
|
image: alpine
|
|
restart: true
|
|
state: absent
|
|
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
|