[IMP] speed up start of container
we rsync the virtual env of odoo to a volume at the end of the init phase. Rather than rsync'ing back, mount the volume on top of the odoo venv from the base docker image.
This commit is contained in:
parent
b8a9fadb26
commit
b592ecb327
2 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,16 @@
|
||||||
|
|
||||||
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
|
#rsync -a --delete /mnt/data/odoo-venv/ /opt/odoo-venv
|
||||||
pip list
|
pip list
|
||||||
|
# issue#23: install debian package dependencies (hack oca_install_addons to only
|
||||||
|
# install 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.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue