postgres changes

master
Michał 'rysiek' Woźniak 2015-01-04 17:31:46 +01:00
parent f4d6db60e2
commit 1cbd975b88
2 changed files with 13 additions and 6 deletions

View File

@ -22,7 +22,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get upgrade &
# after each ``apt-get``
# Only quassel needs to connectm eh?
# TEMPORARY
# TEMPORARY, NEED BETTER FIX
RUN echo "host any any 172.17.0.0/16 trust" >> /etc/postgresql/9.3/main/pg_hba.conf
# Well...
@ -33,6 +33,13 @@ ADD prep.sh /root/prep.sh
# just in case this is a test drive -- production environments will need to re-run prep.sh for the external volume
RUN ls -l /root && /bin/bash /root/prep.sh
RUN echo " \n\
\n\
******************************************************** \n\
REMEMBER TO RUN THE PREP SCRIPT: \n\
docker run --entrypoint /bin/sh -u root -t -i -v <volume>:/var/lib/postgresql/ --rm <plug/postgres> -c /root/prep.sh
"
# Expose the PostgreSQL port
EXPOSE 5432

View File

@ -17,8 +17,8 @@ chmod 0700 ./
# initdb as postgres
su -c '/usr/lib/postgresql/9.3/bin/initdb /var/lib/postgresql/9.3/main' postgres
# let quassel db
/etc/init.d/postgresql start
su -c 'psql --command "CREATE USER quassel;"' postgres
su -c "psql --command \"CREATE DATABASE quassel WITH OWNER quassel TEMPLATE template0 ENCODING 'UTF8';\"" postgres
/etc/init.d/postgresql stop
# create the needed databases
#/etc/init.d/postgresql start
#su -c 'psql --command "CREATE USER some_user;"' postgres
#su -c "psql --command \"CREATE DATABASE some_db WITH OWNER some_user TEMPLATE template0 ENCODING 'UTF8';\"" postgres
#/etc/init.d/postgresql stop