From 1ebb2178972de6ef08c349699c1fce42e82a3515 Mon Sep 17 00:00:00 2001 From: Ivan Nikolaev-Axenov Date: Fri, 30 May 2025 13:30:26 +0300 Subject: [PATCH] debug fix v7 --- clr_test/db-updater/Dockerfile | 5 ++++- clr_test/db-updater/init.sh | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 clr_test/db-updater/init.sh diff --git a/clr_test/db-updater/Dockerfile b/clr_test/db-updater/Dockerfile index c13d6eb87..d1b0cc799 100644 --- a/clr_test/db-updater/Dockerfile +++ b/clr_test/db-updater/Dockerfile @@ -1,7 +1,10 @@ FROM alpine ADD combined_update_ddl.sql /init.sql +ADD init.sh /init.sh RUN apk add --update --no-cache postgresql-client +RUN chmod +x init.sql +RUN find . -name "*.sh" | xargs sed -i 's/\r$//' -CMD [ "sh", "-c", "ls -la && psql --version && psql -U clearing -h db -p 5432 -d clearing -f ./init.sql && tail -f /dev/null" ] \ No newline at end of file +CMD [ "sh", "-c", "./init.sh" ] \ No newline at end of file diff --git a/clr_test/db-updater/init.sh b/clr_test/db-updater/init.sh new file mode 100644 index 000000000..44561ca77 --- /dev/null +++ b/clr_test/db-updater/init.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +echo "PSQL version: " && psql --version + +cat init.sql + +echo "Updating database" && psql -h db clearing < init.sql clearing + +tail -f /dev/null \ No newline at end of file