Обсуждение: pgAdmin in Docker: independent users storage

Поиск
Список
Период
Сортировка

pgAdmin in Docker: independent users storage

От
Vladimir Ryabtsev
Дата:
Hi,

I am running pgAdmin in Rancher, which means the container, in some circumstances, can be moved to another host. In this case I lose all users as well as users' settings (set-up server connections), which in turn implies I have to re-create users and they have to set up everything again.

To make pgAdmin tolerant to restarts and moves, I guess I need to put it's database on some volume that would be mounted to container on any host.

How to do it?

Best regards,
Vladimir

SV: pgAdmin in Docker: independent users storage

От
Henrik Uggla
Дата:
Yes, put the Sqlite file (by default named pgadmin4.db) on a shared persistent volume on f ex Rancher-NFS. I don't know
whichDocker image you are using but if you use mine (huggla/pgadmin-alpine), then you're able to change the location of
thesqlite file inside the container by setting the environment variable VAR_param_SQLITE_PATH. 

Cheers,
Henrik
________________________________________
Från: Vladimir Ryabtsev <greatvovan@gmail.com>
Skickat: den 24 augusti 2018 01:25:37
Till: pgadmin-support@lists.postgresql.org
Ämne: pgAdmin in Docker: independent users storage

Hi,

I am running pgAdmin in Rancher, which means the container, in some circumstances, can be moved to another host. In
thiscase I lose all users as well as users' settings (set-up server connections), which in turn implies I have to
re-createusers and they have to set up everything again. 

To make pgAdmin tolerant to restarts and moves, I guess I need to put it's database on some volume that would be
mountedto container on any host. 

How to do it?

Best regards,
Vladimir


Re: pgAdmin in Docker: independent users storage

От
Vladimir Ryabtsev
Дата:
I am using dpage/pgadmin4, which is referenced from https://www.pgadmin.org/download/pgadmin-4-container/
Does it have similar env. var.?
Will try your image anyway.

Regards,
Vlad

пт, 24 авг. 2018 г. в 1:17, Henrik Uggla <Henrik.Uggla@kristianstad.se>:
Yes, put the Sqlite file (by default named pgadmin4.db) on a shared persistent volume on f ex Rancher-NFS. I don't know which Docker image you are using but if you use mine (huggla/pgadmin-alpine), then you're able to change the location of the sqlite file inside the container by setting the environment variable VAR_param_SQLITE_PATH.

Cheers,
Henrik
________________________________________
Från: Vladimir Ryabtsev <greatvovan@gmail.com>
Skickat: den 24 augusti 2018 01:25:37
Till: pgadmin-support@lists.postgresql.org
Ämne: pgAdmin in Docker: independent users storage

Hi,

I am running pgAdmin in Rancher, which means the container, in some circumstances, can be moved to another host. In this case I lose all users as well as users' settings (set-up server connections), which in turn implies I have to re-create users and they have to set up everything again.

To make pgAdmin tolerant to restarts and moves, I guess I need to put it's database on some volume that would be mounted to container on any host.

How to do it?

Best regards,
Vladimir

Re: pgAdmin in Docker: independent users storage

От
Vladimir Ryabtsev
Дата:
Tried some of huggla/pgadmin-alpine images. I start it with

docker run -it --rm -v VAR_param_SERVER_MODE=True -v VAR_email_server=user@domain.com -v VAR_password_server=qwerty -p 5050:5050 huggla/pgadmin-alpine:<tag>


latest:
does not work (but you mentioned it should not)

20180907-edge:
reports "sudo: /usr/local/bin/sudo must be owned by uid 0 and have the setuid bit set" and exits.

20180829:
reports "env: can't execute '/stop/stage1': Text file busy" and exits on one machine;
launches version 3.2 in DESKTOP mode on another.

20180829-edge:
reports "env: can't execute '/stop/stage1': Text file busy" and exits on one machine;
launches version 3.2 in DESKTOP mode on another.

20180628:
works on both machines and launches version version 3.0 in DESKTOP mode.
What are these errors? Why won't it start in SERVER mode?

Regards,
Vlad

пт, 24 авг. 2018 г. в 1:17, Henrik Uggla <Henrik.Uggla@kristianstad.se>:
Yes, put the Sqlite file (by default named pgadmin4.db) on a shared persistent volume on f ex Rancher-NFS. I don't know which Docker image you are using but if you use mine (huggla/pgadmin-alpine), then you're able to change the location of the sqlite file inside the container by setting the environment variable VAR_param_SQLITE_PATH.

Cheers,
Henrik
________________________________________
Från: Vladimir Ryabtsev <greatvovan@gmail.com>
Skickat: den 24 augusti 2018 01:25:37
Till: pgadmin-support@lists.postgresql.org
Ämne: pgAdmin in Docker: independent users storage

Hi,

I am running pgAdmin in Rancher, which means the container, in some circumstances, can be moved to another host. In this case I lose all users as well as users' settings (set-up server connections), which in turn implies I have to re-create users and they have to set up everything again.

To make pgAdmin tolerant to restarts and moves, I guess I need to put it's database on some volume that would be mounted to container on any host.

How to do it?

Best regards,
Vladimir

Re: pgAdmin in Docker: independent users storage

От
Vladimir Ryabtsev
Дата:
UPDATE:
I am sorry, of course I made a stupid mistake by using wrong command key for environment variables. After changing it to "-e" pgAdmin4 does start in SERVER mode. I also had to remove "-t" in order for it to bypass password request.

Any ETA when version 3.3 will be released in the image?

Regards,
Vlad

пт, 14 сент. 2018 г. в 23:36, Vladimir Ryabtsev <greatvovan@gmail.com>:
Tried some of huggla/pgadmin-alpine images. I start it with

docker run -it --rm -v VAR_param_SERVER_MODE=True -v VAR_email_server=user@domain.com -v VAR_password_server=qwerty -p 5050:5050 huggla/pgadmin-alpine:<tag>


latest:
does not work (but you mentioned it should not)

20180907-edge:
reports "sudo: /usr/local/bin/sudo must be owned by uid 0 and have the setuid bit set" and exits.

20180829:
reports "env: can't execute '/stop/stage1': Text file busy" and exits on one machine;
launches version 3.2 in DESKTOP mode on another.

20180829-edge:
reports "env: can't execute '/stop/stage1': Text file busy" and exits on one machine;
launches version 3.2 in DESKTOP mode on another.

20180628:
works on both machines and launches version version 3.0 in DESKTOP mode.
What are these errors? Why won't it start in SERVER mode?

Regards,
Vlad

пт, 24 авг. 2018 г. в 1:17, Henrik Uggla <Henrik.Uggla@kristianstad.se>:
Yes, put the Sqlite file (by default named pgadmin4.db) on a shared persistent volume on f ex Rancher-NFS. I don't know which Docker image you are using but if you use mine (huggla/pgadmin-alpine), then you're able to change the location of the sqlite file inside the container by setting the environment variable VAR_param_SQLITE_PATH.

Cheers,
Henrik
________________________________________
Från: Vladimir Ryabtsev <greatvovan@gmail.com>
Skickat: den 24 augusti 2018 01:25:37
Till: pgadmin-support@lists.postgresql.org
Ämne: pgAdmin in Docker: independent users storage

Hi,

I am running pgAdmin in Rancher, which means the container, in some circumstances, can be moved to another host. In this case I lose all users as well as users' settings (set-up server connections), which in turn implies I have to re-create users and they have to set up everything again.

To make pgAdmin tolerant to restarts and moves, I guess I need to put it's database on some volume that would be mounted to container on any host.

How to do it?

Best regards,
Vladimir

Re: pgAdmin in Docker: independent users storage

От
Henrik Uggla
Дата:
I plan to have the 3.3 docker image ready some day next week.

Regards
Henrik

Re: pgAdmin in Docker: independent users storage

От
Dave Page
Дата:


On Sat, Sep 15, 2018 at 6:33 AM, Vladimir Ryabtsev <greatvovan@gmail.com> wrote:
I am using dpage/pgadmin4, which is referenced from https://www.pgadmin.org/download/pgadmin-4-container/
Does it have similar env. var.?

When you launch with docker you'd use something like the following on the command line to map the directory containing session data and configs to the host:

-v "/private/var/lib/pgadmin:/var/lib/pgadmin"

The first path being the one on the host, the second being the path in the container to remap.

I don't know how that's done in Rancher.
 
Will try your image anyway.

Regards,
Vlad

пт, 24 авг. 2018 г. в 1:17, Henrik Uggla <Henrik.Uggla@kristianstad.se>:
Yes, put the Sqlite file (by default named pgadmin4.db) on a shared persistent volume on f ex Rancher-NFS. I don't know which Docker image you are using but if you use mine (huggla/pgadmin-alpine), then you're able to change the location of the sqlite file inside the container by setting the environment variable VAR_param_SQLITE_PATH.

Cheers,
Henrik
________________________________________
Från: Vladimir Ryabtsev <greatvovan@gmail.com>
Skickat: den 24 augusti 2018 01:25:37
Till: pgadmin-support@lists.postgresql.org
Ämne: pgAdmin in Docker: independent users storage

Hi,

I am running pgAdmin in Rancher, which means the container, in some circumstances, can be moved to another host. In this case I lose all users as well as users' settings (set-up server connections), which in turn implies I have to re-create users and they have to set up everything again.

To make pgAdmin tolerant to restarts and moves, I guess I need to put it's database on some volume that would be mounted to container on any host.

How to do it?

Best regards,
Vladimir



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

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

Re: pgAdmin in Docker: independent users storage

От
Henrik Uggla
Дата:
Use the web-gui. Navigate to your service, you'll find a volume tab. Add your volumes without -v in the begining.

Re: pgAdmin in Docker: independent users storage

От
Vladimir Ryabtsev
Дата:
I see, so instead of pointing on some host/network directory (as I do in Henrik's image) I can just map this directory and override it inside the container.
I think we need to mention this on the image's page https://hub.docker.com/r/dpage/pgadmin4/, I believe this is extremely useful, and even must be recommended for Docker deployment. Storing data inside a container is a way to instantly lose all data with every redeployment/image upgrade. One may also want to map directory /var/log/pgadmin to access logs in a convenient place.

Regards,
Vlad

Re: pgAdmin in Docker: independent users storage

От
Dave Page
Дата:
Hi

On Mon, Sep 17, 2018 at 11:55 PM, Vladimir Ryabtsev <greatvovan@gmail.com> wrote:
I see, so instead of pointing on some host/network directory (as I do in Henrik's image) I can just map this directory and override it inside the container.
I think we need to mention this on the image's page https://hub.docker.com/r/dpage/pgadmin4/, I believe this is extremely useful, and even must be recommended for Docker deployment. Storing data inside a container is a way to instantly lose all data with every redeployment/image upgrade. One may also want to map directory /var/log/pgadmin to access logs in a convenient place.

It is mentioned there. The second example specifically says it uses a shared config/storage directory. 

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

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