7

I have a Rails app that I'm deploying using Docker containers. I'm using PostgreSQL for the database, and I'm trying to set up WAL-E to do continuous backups to an S3 bucket. The setup for this involves making a few changes to the postgresql.conf file.

I am using a postgres official image as a base image, and am passing in a postgresql.conf file. Here is my Dockerfile:

FROM postgres:9.4
MAINTAINER David Ham <[email protected]>

RUN apt-get update -y && apt-get install -y \
    git \
    python-virtualenv \
    python-dev \
    python-pip \
    libevent-dev \
    pv \
    lzop

RUN virtualenv /opt/wale \
    && . /opt/wale/bin/activate \
    && pip install git+https://github.com/wal-e/wal-e

COPY postgresql.conf /postgresql-wal-e/postgresql-wal-e.conf

RUN chown -R postgres:postgres /postgresql-wal-e

CMD ["postgres", "-c", "config-file=/postgresql-wal-e/postgresql-wal-e.conf"]

Is this right? It seems to have copied in correctly, but is this the right way to configure Postgres with their official images?

2

1 Answer 1

-1

yes, your way to configure should work.

you can find other ways in answers of this question How to customize the configuration file of the official PostgreSQL Docker image?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.