2021-02-13 23:10:13 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
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 \
|
2021-02-13 23:10:13 -05:00
|
|
|
--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 \
|
2021-07-07 23:45:14 -04:00
|
|
|
docker.io/fireflyiii/core:version-5.5.12
|
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 \
|
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
|
|
|
$@
|