Added entrypoint and pg_pass creation script
This commit is contained in:
parent
3f2cae25d2
commit
dea68fd793
3 changed files with 8 additions and 0 deletions
|
@ -21,3 +21,7 @@ RUN apt-get update
|
||||||
# Install the latest version of PostgreSQL.
|
# Install the latest version of PostgreSQL.
|
||||||
# If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql':
|
# If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql':
|
||||||
RUN apt-get -y install postgresql
|
RUN apt-get -y install postgresql
|
||||||
|
|
||||||
|
|
||||||
|
# Prepare Entrypoint Script
|
||||||
|
ADD resources /tmp/resources
|
3
infrastrucure/docker/image/resources/create_pg_pass.sh
Normal file
3
infrastrucure/docker/image/resources/create_pg_pass.sh
Normal file
|
@ -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
|
1
infrastrucure/docker/image/resources/entrypoint.sh
Normal file
1
infrastrucure/docker/image/resources/entrypoint.sh
Normal file
|
@ -0,0 +1 @@
|
||||||
|
./create_pg_pass.sh
|
Loading…
Reference in a new issue