diff --git a/Dockerfile b/Dockerfile index fb76ce6..532cc62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,11 @@ MAINTAINER sameer@damagehead.com RUN apt-get update && \ apt-get install -y postgresql postgresql-client && \ + rm -rf /var/lib/postgresql && \ apt-get clean # 20140525 ADD assets/ /app/ -RUN chmod 755 /app/init /app/setup/install -RUN /app/setup/install +RUN chmod 755 /app/init EXPOSE 5432 diff --git a/assets/init b/assets/init index 5f47d82..59097e0 100755 --- a/assets/init +++ b/assets/init @@ -6,6 +6,19 @@ set -e chown -R postgres:postgres /var/lib/postgresql chmod 700 /var/lib/postgresql +# disable ssl +sed 's/ssl = true/#ssl = true/' -i /etc/postgresql/9.1/main/postgresql.conf + +# listen on all interfaces +cat >> /etc/postgresql/9.1/main/postgresql.conf <> /etc/postgresql/9.1/main/pg_hba.conf <> /etc/postgresql/9.1/main/postgresql.conf <> /etc/postgresql/9.1/main/pg_hba.conf < \password db_user *" -echo "* sudo -u postgres createdb -O db_user db_name *" -echo "*************************************************************************" -echo ""