diff --git a/infrastrucure/docker/image/resources/entrypoint.sh b/infrastrucure/docker/image/resources/entrypoint.sh new file mode 100755 index 0000000..72b0870 --- /dev/null +++ b/infrastrucure/docker/image/resources/entrypoint.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +function main() { + file_env POSTGRES_DB + file_env POSTGRES_PASSWORD + file_env POSTGRES_USER + + create-pg-pass + + # Idle process + while true; do + sleep 500000 + done +} + +source /usr/local/lib/functions.sh +source /usr/local/lib/pg-functions.sh +main diff --git a/infrastrucure/docker/image/resources/install.sh b/infrastrucure/docker/image/resources/install.sh index c27c1c5..3e43e6a 100755 --- a/infrastrucure/docker/image/resources/install.sh +++ b/infrastrucure/docker/image/resources/install.sh @@ -10,6 +10,7 @@ apt-get -qqy install wget postgresql-client-13 restic > /dev/null; update-ca-certificates +install -m 0700 /tmp/entrypoint.sh / install -m 0400 /tmp/functions.sh /usr/local/lib/ install -m 0400 /tmp/pg-functions.sh /usr/local/lib/ install -m 0400 /tmp/file-functions.sh /usr/local/lib/