Sign inSign up

manthanp/firefly-iii

By manthanp

Updated 4 months ago

Based on fireflyiii/core with modifications to run on Azure App Service w/ SQLite.

Image
0

10K+

manthanp/firefly-iii repository overview

Running

Enable apps service storage by adding/setting WEBSITES_ENABLE_APP_SERVICE_STORAGE to true in app settings (configuration) of the App Service. Then use the below docker-compose.yml in Deployment Center.

docker-compose.yml
version: "3.4"

services:
  manthanp-firefly-iii:
    image: manthanp/firefly-iii:version-6.0.30
    container_name: manthanp-firefly-iii
    restart: always
    ports:
      # These ports are in format <host-port>:<container-port>
      - "80:8080"
      
    environment:
      # encryption key (for sessions)
      APP_KEY: some_random_key
      # this is required to make sure form submits work on browsers & chrome doesn't complain about mixed content delivery
      TRUSTED_PROXIES: "**"

    volumes:
      - ${WEBAPP_STORAGE_HOME}/site/wwwroot/upload:/var/www/html/storage/upload
      - ${WEBAPP_STORAGE_HOME}/site/wwwroot/database:/var/www/html/storage/database

You can pass through other environment variables as needed by fireflyiii/core

Note: The image tags are mapped 1:1 to fireflyiii/core

What, Why & How?

Checkout overview here -> manthanp/baikal

Scripts

Dockerfile
# https://hub.docker.com/r/fireflyiii/core
FROM fireflyiii/core:version-6.0.30
LABEL maintainer="[email protected]"

# RUN mkdir -p /manthan
COPY CreateDBIfNotExist.sh /
COPY Main.sh /
# WORKDIR /manthan
RUN chmod +x /CreateDBIfNotExist.sh
RUN chmod +x /Main.sh

RUN apt-get update && apt-get upgrade -y
RUN apt-get install sqlite3 -y

ENTRYPOINT [ "/Main.sh" ]
Main.sh
#!/bin/bash
/bin/bash /CreateDBIfNotExist.sh
/bin/bash /usr/local/bin/entrypoint.sh
CreateDBIfNotExist.sh
#!/bin/bash
echo "executing CreateDBIfNotExist.sh"

DATABASE_DIRECTORY="/var/www/html/storage/database"
DATABASE_FILE="database.sqlite"
# https://stackoverflow.com/a/4181721/6818945
DATABASE="${DATABASE_DIRECTORY}/${DATABASE_FILE}"

echo "LOG -- checking if $DATABASE already exists???"
# exit if db already exists
if [ -f "$DATABASE" ]
then
    echo "LOG -- ${DATABASE} already exists"
    exit 0
fi

echo "LOG -- ${DATABASE} does not exist"

echo "LOG -- creating ${DATABASE_DIRECTORY}"
# https://stackoverflow.com/a/793867/6818945
mkdir -p "$DATABASE_DIRECTORY"

echo "LOG -- cd /"
cd /
echo "LOG -- touching $DATABASE_FILE"
touch "$DATABASE_FILE"
echo "LOG -- applying PRAGMA journal mode = wal"
sqlite3 "$DATABASE_FILE" 'PRAGMA journal_mode=wal;'
echo "LOG -- moving to $DATABASE_DIRECTORY"
mv "$DATABASE_FILE" "$DATABASE_DIRECTORY"

Tag summary

Content type

Image

Digest

sha256:4b5dfcd51

Size

349.6 MB

Last updated

4 months ago

docker pull manthanp/firefly-iii