Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-k
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' >> /etc/apt/sources.list.d/pgdg.list

RUN apt-get update && \
apt-get install -y postgresql-9.6 postgresql-contrib-9.6 && \
apt-get install -y postgresql-10 postgresql-contrib-10 && \
rm -rf /var/lib/apt/lists/*

RUN pg_dropcluster --stop 9.6 main && \
pg_createcluster --locale en_US.UTF-8 --start 9.6 main
RUN pg_dropcluster --stop 10 main && \
pg_createcluster --locale en_US.UTF-8 --start 10 main

RUN echo "\
synchronous_commit = off\n\
fsync = off\n\
full_page_writes = off\n\
wal_writer_delay = 5000ms\n\
listen_addresses = '*'\n\
" >> /etc/postgresql/9.6/main/postgresql.conf
" >> /etc/postgresql/10/main/postgresql.conf

RUN echo 'host all all 0.0.0.0/0 password' >> /etc/postgresql/9.6/main/pg_hba.conf
RUN echo 'host all all 0.0.0.0/0 password' >> /etc/postgresql/10/main/pg_hba.conf

RUN service postgresql start && \
su postgres -c "psql -c \"ALTER USER postgres PASSWORD 'password'\"" && \
service postgresql stop

USER postgres
CMD ["/usr/lib/postgresql/9.6/bin/postgres", "-D", "/var/lib/postgresql/9.6/main", "-c", "config_file=/etc/postgresql/9.6/main/postgresql.conf"]
CMD ["/usr/lib/postgresql/10/bin/postgres", "-D", "/var/lib/postgresql/10/main", "-c", "config_file=/etc/postgresql/10/main/postgresql.conf"]
2 changes: 1 addition & 1 deletion codeship-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
type: push
service: pgci
image_name: codeship/pgci
image_tag: 9.6
image_tag: 10
registry: https://index.docker.io/v1/
encrypted_dockercfg_path: dockercfg.encrypted