scripts/fogcutter/docker/firefly.sh

61 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 8080 in pew-net
# env options: https://raw.githubusercontent.com/firefly-iii/firefly-iii/main/.env.example
# Create firefly.env with APP_KEY
docker run \
--detach \
--name firefly \
--restart unless-stopped \
--env-file firefly.env \
--env SITE_OWNER=paulsw.pw@gmail.com \
--env TZ=US/Eastern \
--env TRUSTED_PROXIES=** \
--env DB_CONNECTION=mysql \
--env DB_HOST=firefly-mariadb \
--env DB_PORT=3306 \
--env DB_DATABASE=firefly \
--env DB_USERNAME=firefly \
--env DB_PASSWORD=firefly \
--env APP_URL=https://ff.seaturtle.pw \
--volume /bigdata/k8s-config/firefly/data:/var/www/html/storage/upload:rw \
--network pew-net \
docker.io/fireflyiii/core:version-5.5.12
# Exposed on port 3306 in pew-net
docker run \
--detach \
--name firefly-mariadb \
--restart unless-stopped \
--env MYSQL_RANDOM_ROOT_PASSWORD=notnullvalue \
--env MYSQL_PASSWORD=firefly \
--env MYSQL_DATABASE=firefly \
--env MYSQL_USER=firefly \
--volume /bigdata/k8s-config/firefly/mariadb:/var/lib/mysql:rw \
--network pew-net \
docker.io/mariadb:10.5.6
}
down () {
docker stop firefly || true
docker rm firefly || true
docker stop firefly-mariadb || true
docker rm firefly-mariadb || true
}
logs () {
docker logs --follow firefly
}
logsm () {
docker logs --follow firefly-mariadb
}
$@