postgres changes
parent
f4d6db60e2
commit
1cbd975b88
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue