scripts/fogcutter/docker/firefly.sh

65 lines
1.6 KiB
Bash
Raw Normal View History

2021-02-13 23:10:13 -05:00
#!/bin/bash
set -e
2022-11-12 11:26:38 -05:00
# Don't forget cron!
# https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/
2021-02-13 23:10:13 -05:00
up () {
2021-05-16 21:41:38 -04:00
docker network create pew-net || true
2021-02-13 23:10:13 -05:00
# 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
2021-05-16 21:41:38 -04:00
docker run \
--detach \
2021-02-13 23:10:13 -05:00
--name firefly \
2021-05-16 21:41:38 -04:00
--restart unless-stopped \
2021-03-07 20:21:54 -05:00
--env-file firefly.env \
2022-09-25 10:18:12 -04:00
--env SITE_OWNER=paul@bigcavemaps.com \
2021-02-13 23:10:13 -05:00
--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 \
2022-02-26 12:14:35 -05:00
docker.io/fireflyiii/core:latest
2021-02-13 23:10:13 -05:00
# Exposed on port 3306 in pew-net
2021-05-16 21:41:38 -04:00
docker run \
--detach \
2021-02-13 23:10:13 -05:00
--name firefly-mariadb \
2021-05-16 21:41:38 -04:00
--restart unless-stopped \
2022-02-26 12:14:35 -05:00
--label com.centurylinklabs.watchtower.enable=false \
2021-02-13 23:10:13 -05:00
--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 \
2021-05-16 21:41:38 -04:00
docker.io/mariadb:10.5.6
2021-02-13 23:10:13 -05:00
}
down () {
2021-05-16 21:41:38 -04:00
docker stop firefly || true
docker rm firefly || true
docker stop firefly-mariadb || true
docker rm firefly-mariadb || true
2021-02-13 23:10:13 -05:00
}
logs () {
2021-05-16 21:41:38 -04:00
docker logs --follow firefly
2021-02-13 23:10:13 -05:00
}
logsm () {
2021-05-16 21:41:38 -04:00
docker logs --follow firefly-mariadb
2021-02-13 23:10:13 -05:00
}
2021-05-16 21:41:38 -04:00
2021-02-13 23:10:13 -05:00
$@