1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-04 15:54:48 +01:00

Enable caching of Nextcloud downloads as well as downloading Nextcloud from github instead of Nextcloud servers

This commit is contained in:
downtownallday
2020-11-05 16:19:42 -05:00
parent 5a023f7868
commit e43c01e6fe
8 changed files with 519 additions and 39 deletions

View File

@@ -11,6 +11,8 @@ export EMAIL_ADDR="${EMAIL_ADDR:-qa@abc.com}"
export EMAIL_PW="${EMAIL_PW:-Test_1234}"
export PUBLIC_IP="${PUBLIC_IP:-$(source ${MIAB_DIR:-.}/setup/functions.sh; get_default_privateip 4)}"
export LOCAL_MODS_DIR="${LOCAL_MODS_DIR:-local}"
export DOWNLOAD_CACHE_DIR="${DOWNLOAD_CACHE_DIR:-$(pwd)/downloads}"
export DOWNLOAD_NEXTCLOUD_FROM_GITHUB="${DOWNLOAD_NEXTCLOUD_FROM_GITHUB:-false}"
# Used by ehdd/start-encrypted.sh
export EHDD_KEYFILE="${EHDD_KEYFILE:-}"

View File

@@ -66,4 +66,38 @@ echo "EXITCODE: $rc"
SH
end
# unsetvars: because miab sets bash '-e' to fail the any setup
# script when any script command returns a non-zero exit code, and
# more importantly '-u' which fails the script when any unset
# variable is accessed, this definition sets a minimal number of
# environment variables prior to running start.sh. Doing so will
# test that no failures occur during setup in the most common use
# case because other vagrant definitions in this file load
# tests/system-setup/setup-default.sh, which pre-assign a value to
# most variables.
if ENV['tests']=='all'
config.vm.define "unsetvars" do |m1|
m1.vm.hostname = "mailinabox.lan"
m1.vm.network "private_network", ip: "192.168.50.4"
m1.vm.provision :shell, :inline => <<-SH
# Set environment variables so that the setup script does
# not ask any questions during provisioning. We'll let the
# machine figure out its own public IP.
export NONINTERACTIVE=1
export PUBLIC_IP=auto
export PUBLIC_IPV6=auto
export PRIMARY_HOSTNAME=auto
export SKIP_NETWORK_CHECKS=1
# Start the setup script.
cd /mailinabox
setup/start.sh
echo "EXITCODE: $?"
SH
end
end
end