Skip to content

Commit

Permalink
Merge pull request #101 from sbidoul/always-create-baseonly-db
Browse files Browse the repository at this point in the history
Always create the baseonly database
  • Loading branch information
sbidoul authored Nov 20, 2023
2 parents 8c90401 + 0673e1b commit 8813f67
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/runboat/kubefiles/runboat-initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ dropdb --if-exists ${PGDATABASE}-baseonly

ADDONS=$(manifestoo --select-addons-dir ${ADDONS_DIR} --select-include "${INCLUDE}" --select-exclude "${EXCLUDE}" list --separator=,)

# Create the baseonly database if installation failed.
unbuffer $(which odoo || which openerp-server) \
--data-dir=/mnt/data/odoo-data-dir \
--db-template=template1 \
-d ${PGDATABASE}-baseonly \
-i base \
--stop-after-init

# Try to install all addons, but do not fail in case of error, to let the build start
# so users can work with the 'baseonly' database.
unbuffer $(which odoo || which openerp-server) \
--data-dir=/mnt/data/odoo-data-dir \
--db-template=template1 \
-d ${PGDATABASE} \
-i ${ADDONS:-base} \
--stop-after-init || \
# Create the baseonly database if installation failed.
(dropdb --if-exists ${PGDATABASE} && \
unbuffer $(which odoo || which openerp-server) \
--data-dir=/mnt/data/odoo-data-dir \
--db-template=template1 \
-d ${PGDATABASE}-baseonly \
-i base \
--stop-after-init)
--stop-after-init || dropdb --if-exists ${PGDATABASE} && exit 0

0 comments on commit 8813f67

Please sign in to comment.