# fireflyiii - https://awesome-docker-compose.com/firefly-iii
services:
  app:
    image: fireflyiii/core:latest
    container_name: firefly_iii_core
    restart: always
    volumes:
      - ${FIREFLY_DATA}/firefly_upload:/var/www/html/storage/upload
    ports:
      - 3002:8080
    environment:
      - DB_CONNECTION=mysql
      - DB_HOST=db
      - DB_PORT=3306
      - DB_DATABASE=firefly
      - DB_USERNAME=${DB_USERNAME}
      - DB_PASSWORD=${DB_PASSWORD}
      - APP_KEY=${APP_KEY}
      - TZ=UTC
    depends_on:
      - db

  db:
    image: mariadb:lts
    container_name: firefly_iii_db
    restart: always
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
      - MYSQL_USER=${DB_USERNAME}
      - MYSQL_PASSWORD=${DB_PASSWORD}
      - MYSQL_DATABASE=firefly
    volumes:
      - ${FIREFLY_DATA}/firefly_db:/var/lib/mysql