Problem related to volume creation to pgadmin 4 Docker image

From: Rodrigo Mariano <rodmariano13(at)gmail(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Problem related to volume creation to pgadmin 4 Docker image
Date: 2021-10-20 11:40:20
Message-ID: aa45a013-826c-745d-6537-649cdaddc304@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

I'm having a trouble related to pgadmin 4 Docker image
<https://hub.docker.com/r/dpage/pgadmin4>.

I would like to create a volume to //var/lib/pgadmin/storage/ folder, in
order to access backup files created by pgadmin 4 interface, however
error messages about permission denied are raised, for example:

werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The
user does not have permission to read and write to the specified storage
directory.

Is there a way to create this volume?

I had to use a command to change user and group of my volume to
5050:5050 (i.e. /sudo chown -R 5050:5050 pgadmin4/), but now I'm not
able to get into the folder anymore, even when I try creating a volume
to //var/lib/pgadmin/storage/ folder directly.

I send below my Docker compose file with default values.

Thank you in advance.

Best regards,
Rodrigo

-

/docker-compose.yml/

version: '3'

services:
  cdsr_postgis:
    container_name: cdsr_postgis
    image: kartoza/postgis:11.0-2.5
    restart: on-failure
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASS=postgres
      - ALLOW_IP_RANGE=0.0.0.0/0
      -
POSTGRES_MULTIPLE_EXTENSIONS=postgis,hstore,postgis_topology,pgrouting
    volumes:
      - ./volumes/postgresql:/var/lib/postgresql
    networks:
      - cdsr
    ports:
      - 6000:5432

  cdsr_pgadmin4:
    container_name: cdsr_pgadmin4
    image: dpage/pgadmin4:5.4
    restart: on-failure
    environment:
      - PGADMIN_DEFAULT_EMAIL=postgres(at)localhost(dot)com
      - PGADMIN_DEFAULT_PASSWORD=postgres
    volumes:
      # to fix permission bugs:
      # sudo chown -R 5050:5050 pgadmin4
      - ./volumes/pgadmin4:/var/lib/pgadmin
      - ./volumes/pgadmin4_storage:/var/lib/pgadmin/storage
    networks:
      - cdsr
    depends_on:
      - cdsr_postgis
    ports:
      - 6001:80

networks:
  cdsr:
    driver: bridge

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Aditya Toshniwal 2021-10-20 12:08:03 Re: Problem related to volume creation to pgadmin 4 Docker image
Previous Message Aditya Toshniwal 2021-10-19 12:08:49 Re: PG ADMIN V 6 ERD Diagram