From da98d0e2efb6486321d5d48ebb9deaed594acb3e Mon Sep 17 00:00:00 2001 From: Emilio Moretti Date: Fri, 10 Jan 2020 17:07:21 -0300 Subject: [PATCH] Try exposing the port and restarting postgres I still can't get the django client to be able to connect to this instance --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0e088d3..80f77e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,15 +25,17 @@ RUN apt-get update \ RUN pip install --upgrade pip virtualenv # setup postgresql database and user. -# We don't expose the port, but allow all incomming connections USER postgres RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/11/main/pg_hba.conf RUN echo "listen_addresses='*'" >> /etc/postgresql/11/main/postgresql.conf -RUN /etc/init.d/postgresql start \ -&& psql -c "CREATE USER ctest WITH SUPERUSER PASSWORD 'coveragetest123';ALTER USER ctest CREATEDB;" +RUN service postgresql restart +RUN psql -c "CREATE USER ctest WITH SUPERUSER PASSWORD 'coveragetest123';ALTER USER ctest CREATEDB;" +RUN createdb -O ctest demo USER root +EXPOSE 5432 + COPY entrypoint.sh / RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"]