2023-09-05 11:40:31 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Don't forget cron!
|
|
|
|
# https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/
|
|
|
|
|
|
|
|
up () {
|
|
|
|
# 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=paul@bigcavemaps.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 \
|
2023-09-07 21:08:48 -04:00
|
|
|
--volume /mammoth/firefly/data:/var/www/html/storage/upload:rw \
|
2023-09-05 11:40:31 -04:00
|
|
|
--network pew-net \
|
|
|
|
docker.io/fireflyiii/core:latest
|
|
|
|
|
|
|
|
# Exposed on port 3306 in pew-net
|
|
|
|
docker run \
|
|
|
|
--detach \
|
|
|
|
--name firefly-mariadb \
|
|
|
|
--restart unless-stopped \
|
|
|
|
--label com.centurylinklabs.watchtower.enable=false \
|
|
|
|
--env MYSQL_RANDOM_ROOT_PASSWORD=notnullvalue \
|
|
|
|
--env MYSQL_PASSWORD=firefly \
|
|
|
|
--env MYSQL_DATABASE=firefly \
|
|
|
|
--env MYSQL_USER=firefly \
|
2023-09-07 21:08:48 -04:00
|
|
|
--volume /mammoth/firefly/mariadb:/var/lib/mysql:rw \
|
2023-09-05 11:40:31 -04:00
|
|
|
--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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$@
|