Update Docker for using PostgreSQL 9.6 (#6154)

* Update PullPreviews Postgers Version to 9.6.3

* Adopt Dockerfile.public to Postgres version 9.6

* Fix other Postgres version number bumps for docker

* Docker: use ruby:2.4-stretch as base image

[ci skip]
pull/6158/head
Wieland Lindenthal 7 years ago committed by Oliver Günther
parent e77692dba0
commit 714f90bd10
  1. 2
      Dockerfile
  2. 10
      Dockerfile.public
  3. 2
      docker-compose.pullpreview.yml
  4. 4
      docker/entrypoint
  5. 2
      docker/supervisord.conf
  6. 4
      docs/operations/backup/docker/backup.md

@ -1,4 +1,4 @@
FROM ruby:2.4
FROM ruby:2.4-stretch
ENV NODE_VERSION="7.7.2"
ENV BUNDLER_VERSION="1.11.2"

@ -20,9 +20,9 @@ RUN apt-get update -qq && \
RUN a2enmod proxy proxy_http && rm -f /etc/apache2/sites-enabled/000-default.conf
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.4/main/pg_hba.conf
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.4/main/postgresql.conf
RUN rm -rf /var/lib/postgresql/9.4/main && mkdir -p /var/lib/postgresql/9.4/main && chown -R postgres:postgres /var/lib/postgresql/9.4
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.6/main/pg_hba.conf
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.6/main/postgresql.conf
RUN rm -rf /var/lib/postgresql/9.6/main && mkdir -p /var/lib/postgresql/9.6/main && chown -R postgres:postgres /var/lib/postgresql/9.6
RUN mkdir -p /var/db/openproject/{files,git,svn} && chown -R app:app /var/db/openproject
COPY docker /usr/src/app/docker
@ -32,6 +32,6 @@ COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
EXPOSE 80 5432
# volumes to export
VOLUME ["/var/lib/postgresql/9.4/main", "/var/db/openproject"]
VOLUME ["/var/lib/postgresql/9.6/main", "/var/db/openproject"]
CMD ["/usr/src/app/docker/entrypoint"]
CMD ["/usr/src/app/docker/entrypoint"]

@ -1,5 +1,5 @@
db:
image: postgres:9.4.5
image: postgres:9.6.3
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD: p4ssw0rd

@ -3,10 +3,10 @@
set -e
set -o pipefail
PGDATA=${PGDATA:=/var/lib/postgresql/9.4/main}
PGDATA=${PGDATA:=/var/lib/postgresql/9.6/main}
PGUSER=${PGUSER:=postgres}
PGPASSWORD=${PGPASSWORD:=postgres}
PGBIN="/usr/lib/postgresql/9.4/bin"
PGBIN="/usr/lib/postgresql/9.6/bin"
if [ ! -z "$ATTACHMENTS_STORAGE_PATH" ]; then
mkdir -p "$ATTACHMENTS_STORAGE_PATH"

@ -55,7 +55,7 @@ stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
[program:postgres]
user=postgres
priority=1
command=/usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgresql/9.4/main -c config_file=/etc/postgresql/9.4/main/postgresql.conf
command=/usr/lib/postgresql/9.6/bin/postgres -D /var/lib/postgresql/9.6/main -c config_file=/etc/postgresql/9.6/main/postgresql.conf
autorestart=true
stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log

@ -10,10 +10,10 @@ with Docker:
sudo mkdir -p /var/lib/openproject/{pgdata,logs,static}
docker run -d -p 8080:80 --name openproject -e SECRET_KEY_BASE=secret \
-v /var/lib/openproject/pgdata:/var/lib/postgresql/9.4/main \
-v /var/lib/openproject/pgdata:/var/lib/postgresql/9.6/main \
-v /var/lib/openproject/logs:/var/log/supervisor \
-v /var/lib/openproject/static:/var/db/openproject \
openproject/community:5.0
openproject/community:7.0
If you're using the same local directories than the above command, then you
just need to backup your local `/var/lib/openproject` folder (for instance to

Loading…
Cancel
Save