63 lines
1.5 KiB
Bash
63 lines
1.5 KiB
Bash
|
#!/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 \
|
||
|
--volume /mammoth/k8s-config/firefly/data:/var/www/html/storage/upload:rw \
|
||
|
--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 \
|
||
|
--volume /mammoth/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
|
||
|
}
|
||
|
|
||
|
|
||
|
$@
|