Skip to content

fireflii

Database

Create your database prior to the main container.

Change "user_password" when CREATE USER

CREATE DATABASE firefly;
CREATE USER 'firefly'@'localhost' IDENTIFIED BY 'user_password';
GRANT ALL PRIVILEGES ON firefly.* TO 'firefly'@'localhost';
Inside the fireflii.env setup the credentials used above.

DB_CONNECTION=mysql
DB_HOST=db-firefly
DB_PORT=3306
DB_DATABASE=firefly
DB_USERNAME=firefly
DB_PASSWORD="database_pass_here"

App Key

Needs to be set in the fireflii.env file. It can be generated with php artisan key:generate. You require 32 characters exact length.

fireflyy-db.cnf

[client-server]
# Port or socket location where to connect
port = 3306
socket = /run/mysqld/mysqld.sock

[server]
skip_name_resolve = 1
innodb_buffer_pool_size = 128M
innodb_buffer_pool_instances = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 32M
innodb_max_dirty_pages_pct = 90
query_cache_type = 1
query_cache_limit = 2M
query_cache_min_res_unit = 2k
query_cache_size = 64M
tmp_table_size= 64M
max_heap_table_size= 64M
slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 1

# Import all .cnf files from configuration directory
[mariadbd]
skip-host-cache
skip-name-resolve

[client]
default-character-set = utf8mb4

[mysqld]
transaction_isolation = READ-COMMITTED
binlog_format = ROW
innodb_large_prefix=on
innodb_file_format=barracuda
innodb_file_per_table=1

---

###
# self hosted finance manager
# TESTING only
###

services:
  firefly:
    image: fireflyiii/core:latest
    container_name: firefly
    restart: unless-stopped
    depends_on:
      - db-firefly
    env_file: ./fireflii.env
    volumes:
      - ./data/firefly:/var/www/html/storage/upload
    ports:
      - 8085:8080
    networks:
      - mariadb-net
      - app

  db-firefly:
    image: mariadb:10.5
    container_name: db-firefly
    restart: unless-stopped
    environment:
      - MARIADB_ROOT_PASSWORD=${PASS-DB-ROOT}
    volumes:
      #- ./data/db-firefly:/var/lib/mysql
      - ${DATA-DB-FIREFLII}:/var/lib/mysql
      #- ./firefii-db-my.cnf:/etc/mysql/mariadb.conf.d/mariadb.cnf
    ports:
      - 3306:3306
    networks:
      - mariadb-net

networks:
  mariadb-net:
    external: true
  app:
    external: true