Skip to content

Commit

Permalink
Set postgres to start on boot. (#16)
Browse files Browse the repository at this point in the history
- Use more descriptive test user name.

DATA-1127
  • Loading branch information
Ben McNiel authored and SpainTrain committed Oct 12, 2018
1 parent 7a39908 commit a869e1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions images/finatra-postgres/Dockerfile
Expand Up @@ -16,9 +16,10 @@ RUN apt-get install -y apt-transport-https ca-certificates curl software-propert
RUN apt-get install -y openjdk-8-jdk
RUN apt-get install -y postgresql-9.6 postgresql-contrib-9.6

RUN update-rc.d postgresql enable

USER postgres
RUN service postgresql start &&\
psql --command "CREATE USER adazza WITH SUPERUSER PASSWORD 'adazza';"
RUN service postgresql start && psql --command "CREATE USER adazza_test_user WITH SUPERUSER PASSWORD 'adazza_test_user';"
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.6/main/pg_hba.conf
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.6/main/postgresql.conf

Expand Down
5 changes: 3 additions & 2 deletions images/scala-postgres/Dockerfile
Expand Up @@ -16,9 +16,10 @@ RUN apt-get install -y apt-transport-https ca-certificates curl software-propert
RUN apt-get install -y openjdk-8-jdk
RUN apt-get install -y postgresql-9.6 postgresql-contrib-9.6

RUN update-rc.d postgresql enable

USER postgres
RUN service postgresql start &&\
psql --command "CREATE USER adazza WITH SUPERUSER PASSWORD 'adazza';"
RUN service postgresql start && psql --command "CREATE USER adazza_test_user WITH SUPERUSER PASSWORD 'adazza_test_user';"
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.6/main/pg_hba.conf
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.6/main/postgresql.conf

Expand Down

0 comments on commit a869e1c

Please sign in to comment.