Skip to content

Commit

Permalink
OZ-573: Add environment variable substitution for CSV files in initia…
Browse files Browse the repository at this point in the history
…lizer data directory (#4)
  • Loading branch information
corneliouzbett authored Nov 21, 2024
1 parent 8c29d51 commit 99f07df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG ODOO_BRANCH=14.0

# Install dependencies
RUN apt update && apt install -y git npm postgresql-client python3-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \
libtiff5-dev zlib1g-dev libfreetype6-dev wait-for-it xvfb libfontconfig fontconfig wget \
libtiff5-dev zlib1g-dev libfreetype6-dev wait-for-it xvfb libfontconfig moreutils fontconfig wget \
liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev libpq-dev gettext-base unzip xfonts-75dpi xfonts-base
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_${arch}.deb && \
Expand Down
9 changes: 8 additions & 1 deletion resources/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ if [ -d /etc/properties ]; then
done
fi

# env vars substitution for csv files in ${INITIALIZER_DATA_FILES_PATH} directory
if [ -d "${INITIALIZER_DATA_FILES_PATH}" ]; then
for file in "${INITIALIZER_DATA_FILES_PATH}"/**/*.csv; do
envsubst < "${file}" | sponge "${file}"
done
fi

extra_addons=""
if [ ! -z "$ADDONS_LIST" ]; then
addonsList="-i $ADDONS_LIST"
Expand Down Expand Up @@ -60,4 +67,4 @@ case "$1" in
exec "$@"
esac

exit 1
exit 1

0 comments on commit 99f07df

Please sign in to comment.