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=postg...@localhost.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