Skip to content

Commit

Permalink
[FIX] before entrypoint hooks not called (#265)
Browse files Browse the repository at this point in the history
In the new image layout, the `before-migrate-entrypoint.d` and
`start-entrypoint.d` directories are no longer in the root directories
but in the home directory of `odoo`, and the current code in the
entrypoint would not find them, and therefore would not call them.

Fix the path in the docker entrypoint script.
  • Loading branch information
gurneyalex authored Dec 11, 2023
1 parent 905664b commit 0f27f13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ CMD_ARRAY=($*)
ARGS=(${CMD_ARRAY[@]:1})

if [ "$BASE_CMD" = "odoo" ] || [ "$BASE_CMD" = "odoo.py" ] || [ "$BASE_CMD" = "migrate" ]; then
BEFORE_MIGRATE_ENTRYPOINT_DIR=/before-migrate-entrypoint.d
BEFORE_MIGRATE_ENTRYPOINT_DIR=/odoo/before-migrate-entrypoint.d
if [ -d "$BEFORE_MIGRATE_ENTRYPOINT_DIR" ]; then
run-parts --verbose "$BEFORE_MIGRATE_ENTRYPOINT_DIR"
fi
Expand All @@ -109,7 +109,7 @@ if [ "$BASE_CMD" = "odoo" ] || [ "$BASE_CMD" = "odoo.py" ]; then

fi

START_ENTRYPOINT_DIR=/start-entrypoint.d
START_ENTRYPOINT_DIR=/odoo/start-entrypoint.d
if [ -d "$START_ENTRYPOINT_DIR" ]; then
run-parts --verbose "$START_ENTRYPOINT_DIR"
fi
Expand Down

0 comments on commit 0f27f13

Please sign in to comment.