Report this

What is the reason for this report?

How to upgrade Dokku's PostgreSQL?

Posted on August 8, 2015

Hey guys, I am using this potsgres plugin: https://github.com/Kloadut/dokku-pg-plugin But they don’t provide any info on how to upgrade the postgresql version.

There is a fork that supports 9.4 version (https://github.com/atsoy/dokku-pg-plugin) so I removed the old one, installed the new one, but nothing happens.

The old db is still running and I don’t want to mess with it since there is no manual on how to do it.

Hopefully this helps other folks than just me.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Unfortunately, there is no easy way to accomplish this except for forking the plugin. With Dokku, everything is running inside of Docker containers including the database. If you look at the install script for Kloadut/dokku-pg-plugin, you’ll see that it builds a Docker image based on this Dockerfile:

FROM	ubuntu:trusty
MAINTAINER	kload "kload@kload.fr"

# prevent apt from starting postgres right after the installation
RUN	echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d; chmod +x /usr/sbin/policy-rc.d

RUN apt-get update
RUN	LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y -q postgresql-9.3 postgresql-contrib-9.3
RUN rm -rf /var/lib/apt/lists/*
RUN apt-get clean

# allow autostart again
RUN	rm /usr/sbin/policy-rc.d

ADD	. /usr/bin
RUN	chmod +x /usr/bin/start_pgsql.sh
RUN echo 'host all all 0.0.0.0/0 md5' >> /etc/postgresql/9.3/main/pg_hba.conf
RUN sed -i -e"s/var\/lib/opt/g" /etc/postgresql/9.3/main/postgresql.conf

So the only way to run a different version of Postgres would be to fork the plugin and have it use a different Dockerfile.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.