2019-05-02 18:40:49 +00:00
|
|
|
- name: Create Firefly III Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- "{{ firefly_data_directory }}/postgresql"
|
|
|
|
- "{{ firefly_data_directory }}/mysql"
|
|
|
|
- "{{ firefly_data_directory }}/upload"
|
|
|
|
- "{{ firefly_data_directory }}/export"
|
|
|
|
|
|
|
|
- name: Create MySQL container for Firefly
|
|
|
|
docker_container:
|
|
|
|
name: firefly-mysql
|
|
|
|
image: mysql:5.7
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ firefly_data_directory }}/mysql:/var/lib/mysql:rw"
|
|
|
|
env:
|
2019-07-03 22:00:56 +00:00
|
|
|
MYSQL_DATABASE: "firefly"
|
|
|
|
MYSQL_USER: "firefly"
|
|
|
|
MYSQL_PASSWORD: "firefly"
|
|
|
|
MYSQL_ROOT_PASSWORD: "firefly"
|
2019-05-02 18:40:49 +00:00
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: 1g
|
|
|
|
|
|
|
|
- name: Wait for MySQL to init
|
|
|
|
pause:
|
|
|
|
seconds: 30
|
|
|
|
|
|
|
|
- name: Create Firefly III container
|
|
|
|
docker_container:
|
|
|
|
name: firefly
|
|
|
|
image: jc5x/firefly-iii:latest
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ firefly_data_directory }}/export:/var/www/firefly-iii/storage/export:rw"
|
|
|
|
- "{{ firefly_data_directory }}/upload:/var/www/firefly-iii/storage/upload:rw"
|
|
|
|
links:
|
|
|
|
- firefly-mysql:db
|
|
|
|
ports:
|
2020-01-05 21:47:40 +00:00
|
|
|
- "{{ firefly_port }}:80"
|
2019-05-02 18:40:49 +00:00
|
|
|
env:
|
2019-08-24 19:20:12 +00:00
|
|
|
APP_ENV: "local"
|
|
|
|
APP_KEY: "S0m3R@nd0mString0f32Ch@rsEx@ct1y"
|
|
|
|
DB_HOST: "db"
|
|
|
|
DB_DATABASE: "firefly"
|
|
|
|
DB_USERNAME: "firefly"
|
|
|
|
DB_PASSWORD: "firefly"
|
2019-05-02 18:40:49 +00:00
|
|
|
TZ: "{{ ansible_nas_timezone }}"
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: 1g
|
|
|
|
labels:
|
|
|
|
traefik.backend: "firefly"
|
|
|
|
traefik.frontend.rule: "Host:firefly.{{ ansible_nas_domain }}"
|
|
|
|
traefik.enable: "{{ firefly_available_externally }}"
|
2020-01-05 21:47:40 +00:00
|
|
|
traefik.port: "{{ firefly_port }}"
|