diff --git a/README.md b/README.md index 2cce3a1..8d732be 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ The full build process takes considerable amount of time, so it is advised to ha | Motech | motech | 8013 | 8080 (HTTP) | motech | | ODK Aggregate | opendatakit | 8015 | 8080 (HTTP) | odk | | ODK Build | opendatakit-build | 8017 | 8080 (HTTP) | odkbuild | +| Odoo | odoo | 8019 | 8080 (HTPP) | odoo | | OpenMapKit | openmapkit | 8007 | 8080 (HTTP) | omk | | Pan.do/ra | pandora | 8002 | 8080 (HTTP) | pandora | | Postgres | postgres | 5432 | 5432 (Postgres) | - | diff --git a/app-vmmgr b/app-vmmgr index 6a68be7..be5e95d 160000 --- a/app-vmmgr +++ b/app-vmmgr @@ -1 +1 @@ -Subproject commit 6a68be739ab7ba6c55d79c9abf7744b6eaa35cf7 +Subproject commit be5e95d5c0389ef024359cf4885a0a5792363c05 diff --git a/odoo/install.sh b/odoo/install.sh new file mode 100755 index 0000000..39ecc90 --- /dev/null +++ b/odoo/install.sh @@ -0,0 +1,41 @@ +#!/bin/sh +set -ev + +cd $(realpath $(dirname "${0}"))/install + +# Check prerequisites +[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 + +# Create databases +export ODOO_PWD=$(head -c 18 /dev/urandom | base64) +envsubst /srv/odoo/conf/odoo.conf + +# Populate database +lxc-start odoo -- /srv/odoo/odoo-bin -c /srv/odoo/odoo.conf -i base --load-language=cs_CZ +until grep -q 'odoo.modules.loading: Modules loaded.' /var/log/lxc/odoo.log; do + sleep 1 +done +lxc-stop odoo + +# Update admin account +export ODOO_ADMIN_HASH=$(lxc-execute odoo -- python -c "from passlib.hash import pbkdf2_sha512;print(pbkdf2_sha512.encrypt('${ODOO_ADMIN_PWD}'))") +envsubst