[PATCH 4/6] docker-compose: Switch to 3.0 syntax

Stephen Finucane stephen at that.guru
Thu May 3 00:59:21 AEST 2018


On Tue, 2018-05-01 at 02:41 +1000, Daniel Axtens wrote:
> Stephen Finucane <stephen at that.guru> writes:
> 
> > Ubuntu 18.04 (Bionic Beaver) providers 'docker-compose' 1.17.1 [1] at
> > release which supports the 3.0 syntax [2]. Using this allows some users
> > (me) to resolve a long standing issue caused by a UID that's not 1000.
> > 
> > [1] https://packages.ubuntu.com/bionic/docker-compose
> > [2] https://docs.docker.com/compose/compose-file/
> > ---
> >  .gitignore                        |  3 ++
> >  docker-compose-pg.yml             | 60 ++++++++++++++++++++-------------------
> >  docker-compose.yml                | 56 ++++++++++++++++++------------------
> >  docs/development/installation.rst | 48 +++++++++++++------------------
> >  tools/docker/Dockerfile           |  5 +++-
> >  5 files changed, 86 insertions(+), 86 deletions(-)
> > 
> > diff --git a/.gitignore b/.gitignore
> > index 04b66702..f37caccf 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -52,3 +52,6 @@ htmlcov/
> >  
> >  # Patchwork configuration files
> >  patchwork/settings/production.py
> > +
> > +# docker-compose configuration files
> > +/.env
> > diff --git a/docker-compose-pg.yml b/docker-compose-pg.yml
> > index 81dde3e5..e403547c 100644
> > --- a/docker-compose-pg.yml
> > +++ b/docker-compose-pg.yml
> > @@ -1,30 +1,32 @@
> > -# the version of docker-compose shipped in ubuntu 16.04 is
> > -# 1.5.2, which doesn't support version 2 syntax. Yay!
> > -# also, v1 doesn't support explicit build args, so if you're not
> > -# uid 1000, you will either need to manually hack the Dockerfile
> > -# or upgrade to v2 and use the build-arg to override it.
> > +version: "3"
> > +services:
> > +  db:
> > +    image: postgres:9.6
> > +    volumes:
> > +      - ./tools/docker/db/postdata:/var/lib/postgresql/data
> > +    environment:
> > +      - POSTGRES_PASSWORD=password
> 
> Somehow this seems to be breaking auth:
> 
> db_1   | FATAL:  password authentication failed for user "postgres"
> db_1   | DETAIL:  Password does not match for user "postgres".
> db_1   | 	Connection matched pg_hba.conf line 95: "host all all all md5"
> 
> Does this occur for you? Any thoughts on what might have changed?

It does, yes. This was a misunderstanding on my part RE: the difference
between the PG_PASS and POSTGRES_PASSWORD environment variables: the
former should have not been moved from the 'web' environment list. I'll
submit a patch to fix this shortly.

Stephen


More information about the Patchwork mailing list