use kaniko to build container

This commit is contained in:
Sebastian Hugentobler 2022-02-14 06:47:46 +01:00
parent 58abf18645
commit 56dd40596f
Signed by: shu
GPG key ID: BB32CF3CA052C2F0
9 changed files with 26 additions and 19 deletions

8
rootfs/bin/dbinit Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/with-contenv sh
PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'session')" | grep f
if [ $? -ne 1 ]; then
PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -U $DB_USER -d $DB_NAME -f /var/lib/roundcube/SQL/postgres.initial.sql
fi