debug fix v7

This commit is contained in:
Ivan Nikolaev-Axenov 2025-05-30 13:30:26 +03:00
parent 0be34689ec
commit 1ebb217897
2 changed files with 13 additions and 1 deletions

View file

@ -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" ]
CMD [ "sh", "-c", "./init.sh" ]

View file

@ -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