Merge pull request #50 from sbidoul/use-cp

Use cp instead of rsync
This commit is contained in:
Stéphane Bidoul 2022-03-13 11:43:18 +01:00 committed by GitHub
commit dc280d64bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,13 +2,15 @@
set -exo pipefail
# Remove initialization sentinel, in case we are reinitializing.
rm -fr /mnt/data/initialized
# Remove initialization sentinel and data, in case we are reinitializing.
rm -fr /mnt/data/*
# Remove addons dir, in case we are reinitializing after a previously
# failed installation.
rm -fr $ADDONS_DIR
# Download the repository at git reference into $ADDONS_DIR.
# We use curl instead of git clone because the git clone method used more than 1GB RAM,
# which exceeded the default pod memory limit.
mkdir -p $ADDONS_DIR
cd $ADDONS_DIR
curl -sSL https://github.com/${RUNBOAT_GIT_REPO}/tarball/${RUNBOAT_GIT_REF} | tar zxf - --strip-components=1
@ -25,7 +27,6 @@ else
fi
# Keep a copy of the venv that we can re-use for shorter startup time.
DEBIAN_FRONTEND=noninteractive apt-get -yqq install rsync
rsync -a --delete /opt/odoo-venv/ /mnt/data/odoo-venv
cp -ar /opt/odoo-venv/ /mnt/data/odoo-venv
touch /mnt/data/initialized