#!/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 # 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 || true docker rm seafile || true docker stop seafile-db || true docker rm seafile-db || true docker stop seafile-mc || true docker rm seafile-mc || true } $@