Re: Docker servers pre-loaded script is not executed.

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Juan López <juanlv989(at)gmail(dot)com>
Cc: "pgadmin-support lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: Docker servers pre-loaded script is not executed.
Date: 2019-01-07 10:24:01
Message-ID: CA+OCxox-oWZbwFncABUvZ8K6PF7mcdZCXPA61Tzx4-CPEiquHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi

On Mon, Jan 7, 2019 at 1:33 AM Juan López <juanlv989(at)gmail(dot)com> wrote:
>
> Hi,
>
> I'm using the next docker-compose configuration:
>
> pgAdmin:
> image: dpage/pgadmin4
> ports:
> - "5050:80"
> environment:
> PGADMIN_DEFAULT_EMAIL: user(at)domain(dot)com
> PGADMIN_DEFAULT_PASSWORD: secret
> volumes:
> - ./servers.json:/pgadmin4/servers.json
>
> After run the docker, if I execute the next command:
> $ docker exec pgAdmin cat servers.json
> the servers have been copied properly but the command:
> /usr/local/bin/python /pgadmin4/setup.py --load-servers /pgadmin4/servers.json --user ${PGADMIN_DEFAULT_EMAIL}
> is NOT executed so I haven't the servers available in the app. I've seen it the github (https://github.com/postgres/pgadmin4/blob/master/pkg/docker/entrypoint.sh).
>
> If I execute manually the command (docker exec -it toolbox_pgAdmin_1 python setup.py --load-servers output_file.json --user user(at)domain(dot)com) works properly (for this reason I suspect the entrypoint.sh is not working properly or not found the python part).
>
> Why is not executed and if I do manually is ok?

That feature was added for the upcoming (on Thursday) 4.0 release.
It'll only work on the builds currently on Docker Hub if you use
dpage/pgadmin4:snapshot

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Nanina Tron 2019-01-07 10:34:45 Import/Export failure due to UTF-8 error in pgAdmin4 but not in pgAdmin3
Previous Message Akshay Joshi 2019-01-07 05:55:09 Re: BUG: Can't establish SSH tunnel with 3.6