#!/bin/bash set -e up () { docker run \ --detach \ --name seafile-db \ --restart unless-stopped \ --env MYSQL_ROOT_PASSWORD=seafile_pw \ --env MYSQL_LOG_CONSOLE=true \ --env MARIADB_AUTO_UPGRADE=1 \ --volume /mammoth/seafile/mariadb/mysql:/var/lib/mysql:rw \ --network pew-net \ mariadb:10.11 docker run \ --detach \ --name seafile-mc \ --restart unless-stopped \ --network pew-net \ memcached:1.6.18 /bin/bash -c "memcached -m 256" echo 'Waiting 5 seconds for mariadb to start up...' sleep 5 docker run \ --name seafile-oodc \ --detach \ --restart unless-stopped \ --env DB_TYPE=mariadb \ --env DB_HOST=seafile-db \ --env DB_USER=root \ --env DB_PWD=seafile_pw \ --env JWT_ENABLED=true \ --env JWT_SECRET=notasecret \ --volume /mammoth/seafile/oodc/var/lib/openoffice:/var/lib/onlyoffice:rw \ --volume /mammoth/seafile/oodc/var/log/openoffice:/var/log/onlyoffice:rw \ --volume /mammoth/seafile/oodc/var/www/onlyoffice/Data:/var/www/onlyoffice/Data:rw \ --network pew-net \ onlyoffice/documentserver:8.1.0.1 # Exposed on port 80 in pew-net docker run \ --detach \ --name seafile \ --restart unless-stopped \ --env DB_HOST=seafile-db \ --env DB_ROOT_PASSWD=seafile_pw \ --env TIME_ZONE=America/New_York \ --env SEAFILE_ADMIN_EMAIL=paul@bigcavemaps.com \ --env SEAFILE_SERVER_LETSENCRYPT=false \ --env SEAFILE_SERVER_HOSTNAME=https://docs.bigcavemaps.com \ --volume /mammoth/seafile/seafile/shared:/shared:rw \ --network pew-net \ seafileltd/seafile-mc:11.0-latest } down () { docker stop seafile-db || true docker rm seafile-db || true docker stop seafile-mc || true docker rm seafile-mc || true docker stop seafile-oodc || true docker rm seafile-oodc || true docker stop seafile || true docker rm seafile || true } $@