diff --git a/infrastrucure/docker/image/Dockerfile b/infrastrucure/docker/image/Dockerfile index 4e8a762..ec46356 100644 --- a/infrastrucure/docker/image/Dockerfile +++ b/infrastrucure/docker/image/Dockerfile @@ -21,3 +21,7 @@ RUN apt-get update # Install the latest version of PostgreSQL. # If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql': RUN apt-get -y install postgresql + + +# Prepare Entrypoint Script +ADD resources /tmp/resources \ No newline at end of file diff --git a/infrastrucure/docker/image/resources/create_pg_pass.sh b/infrastrucure/docker/image/resources/create_pg_pass.sh new file mode 100644 index 0000000..3a5a3bd --- /dev/null +++ b/infrastrucure/docker/image/resources/create_pg_pass.sh @@ -0,0 +1,3 @@ +echo "${POSTGRES_HOST}:${POSTGRES_DB}:${POSTGRES_USER}:${DB_PASSWORD}" > /root/.pg_pass +echo "${POSTGRES_HOST}:template1:${POSTGRES_USER}:${DB_PASSWORD}" >> /root/.pg_pass +chmod 0600 /root/.pg_pass diff --git a/infrastrucure/docker/image/resources/entrypoint.sh b/infrastrucure/docker/image/resources/entrypoint.sh new file mode 100644 index 0000000..2ef8157 --- /dev/null +++ b/infrastrucure/docker/image/resources/entrypoint.sh @@ -0,0 +1 @@ +./create_pg_pass.sh \ No newline at end of file