Merge pull request #24 from gurneyalex/main

[IMP] speed up start of container
This commit is contained in:
Stéphane Bidoul 2021-11-26 15:56:29 +01:00 committed by GitHub
commit 71469d2a3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -26,6 +26,9 @@ spec:
mountPath: /runboat mountPath: /runboat
- name: data - name: data
mountPath: /mnt/data mountPath: /mnt/data
- name: data
mountPath: /opt/odoo-venv
subPath: odoo-venv
envFrom: envFrom:
- secretRef: - secretRef:
name: odoosecretenv name: odoosecretenv

View file

@ -2,15 +2,17 @@
set -ex set -ex
DEBIAN_FRONTEND=noninteractive apt-get -yq install rsync
# If it exists, copy the previously initialized venv. # If it exists, copy the previously initialized venv.
if [ -f /mnt/data/initialized ] ; then if [ -f /mnt/data/initialized ] ; then
rsync -a --delete /mnt/data/odoo-venv/ /opt/odoo-venv
pip list pip list
# Install 'deb' external dependencies of all Odoo addons found in path.
DEBIAN_FRONTEND=noninteractive apt-get install -qq --no-install-recommends $(oca_list_external_dependencies deb)
exit 0 exit 0
fi fi
DEBIAN_FRONTEND=noninteractive apt-get -yqq install rsync
# Remove addons dir, in case we are reinitializing after a previously # Remove addons dir, in case we are reinitializing after a previously
# failed installation. # failed installation.
rm -fr $ADDONS_DIR rm -fr $ADDONS_DIR