Re: Using pgadmin in docker via compose

Поиск
Список
Период
Сортировка
От Yogesh Mahajan
Тема Re: Using pgadmin in docker via compose
Дата
Msg-id CAMa=N=MOA4Y4YR0f4cOZB4Tjf0bpJQ-BYaY4HKHMHZpdtJSYDQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Using pgadmin in docker via compose  (Tim Uckun <timuckun@gmail.com>)
Список pgadmin-support
Hi,

Order should not matter here.I tried with above docker-compose & its working fine.
Could you please  try adding the below variable in the environment and creating a container?
PGADMIN_CONFIG_CONSOLE_LOG_LEVEL: 10
And check if logs shows - 
2023-05-17 16:06:15 pgAdmin 4 - Application Initialisation
2023-05-17 16:06:15 ======================================
2023-05-17 16:06:15
2023-05-17 16:06:24 ----------
2023-05-17 16:06:24 Loading servers with:
2023-05-17 16:06:24 User: *****@***.com
2023-05-17 16:06:24 SQLite pgAdmin config: /var/lib/pgadmin/pgadmin4.db
2023-05-17 16:06:24 ----------
2023-05-17 16:06:24 Added 1 Server Group(s) and 7 Server(s).

Also can you please check if the source file path for servers.json is correct? If the source file path is incorrect, servers will not be loaded.

Thanks,
Yogesh Mahajan
EnterpriseDB


On Wed, May 17, 2023 at 3:31 PM Tim Uckun <timuckun@gmail.com> wrote:
Hi.

I want to set up pgadmin in a docker compose and have it automatically
be able to connect to the database running in the same compose file.

I have set up the following entry in the compose file (excuse the indents)

pgadmin:
image: dpage/pgadmin4:latest
volumes:
- ./pgadmin_servers.json:/pgadmin4/servers.json
- ./pgpass:/pgadmin4/.pgpass:ro
ports:
- 5050:5050
environment:
PGADMIN_DEFAULT_EMAIL: timuckun@gmail.com
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_LISTEN_PORT: 5050
PGADMIN_SERVER_JSON_FILE: /pgadmin4/servers.json

This is the servers file

{
"Servers": {
"1": {
"Name": "Minimally Defined Server",
"Group": "Server Group 1",
"Port": 5432,
"Username": "benchmarkdbuser",
"Host": "tfb-database",
"SSLMode": "prefer",
"MaintenanceDB": "hello_world",
"PassFile": "/pgadmin4/.pgpass"
}
}
}

This launched the pgadmin app but the server doesn't show up in the list.

I am wondering what I need to do in order to make this happen. Ideally
the app would also log in as admin and go right to the startup screen.

Thanks.


В списке pgadmin-support по дате отправления:

Предыдущее
От: Aditya Toshniwal
Дата:
Сообщение: Re: Help with running pgadmin in a docker container
Следующее
От: Tim Uckun
Дата:
Сообщение: Re: Using pgadmin in docker via compose