Home > OS >  Docker pgadmin 4 - error: "does not appear to be a valid email address. Please reset the PGADMI
Docker pgadmin 4 - error: "does not appear to be a valid email address. Please reset the PGADMI

Time:10-06

Please bear with me, I'm rather new to docker.

I've got the following docker-compose.yaml file from my colleague who runs this on windows - apparently without problems:

version: "3.3"

services:
  mysql-server:
    image: mysql:8.0.19
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: secret
    volumes:
      - mysql-data:/var/lib/mysql
    ports:
      - "33061:33061"

  phpmyadmin:
    image: phpmyadmin/phpmyadmin:5.1.1
    restart: always
    environment:
      PMA_HOST: mysql-server
      PMA_USER: ${PMA_USER}
      PMA_PASSWORD: ${PMA_PASSWORD}
      UPLOAD_LIMIT: 256M
      MAX_EXECUTION_TIME: 0
    ports:
      - "8080:80"
    volumes:
      - ./database/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php

  postgresdb:
    container_name: pg_container
    image: postgres:latest
    restart: always
    ports: 
      - "54321:54321"
    environment:
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=${POSTGRES_DB}
    volumes:
      - postgres:/var/lib/postgresql/data

  pgadmin:
    container_name: pgadmin_container
    depends_on: 
      - postgresdb
    image: dpage/pgadmin4:5
    restart: always
    ports:
      - "5556:80"
    environment:
      - PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
      - PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
    volumes:
      - pgadmin:/var/lib/pgadmin

  web:
    build:
      context: .
      dockerfile: dockerfile-python
    command: python3 manage.py runserver 0.0.0.0:8000
    container_name: python_myApp
    volumes:
      - .:/theApp
    ports:
      - "8000:8000"
    depends_on:
      - postgresdb
 
volumes:
  mysql-data:
  postgres:
  pgadmin:

I run it on Linux, version is: Docker version 20.10.9, build c2ea9bc

Problem is, container pgadmin won't start up - it gives me the following error:

'"[email protected]"' does not appear to be a valid email address. Please reset the PGADMIN_DEFAULT_EMAIL environment variable and try again.

The .env file looks like that:

PMA_USER="root"
PMA_PASSWORD="XXXX"

POSTGRES_DB='postgres'
POSTGRES_USER='admin'
POSTGRES_PASSWORD='XXXX'

PGADMIN_DEFAULT_EMAIL="[email protected]"
PGADMIN_DEFAULT_PASSWORD="XXXX"

I tried to reset everything by doing a

docker system prune  
docker volume prune

but the error persists. What's going wrong here?

thanks!

CodePudding user response:

You don't need any " in env files, just remove that.

PMA_USER=root
PMA_PASSWORD=XXXX

POSTGRES_DB=postgres
POSTGRES_USER=admin
POSTGRES_PASSWORD=XXXX

PGADMIN_DEFAULT_EMAIL=server@myapp.de
PGADMIN_DEFAULT_PASSWORD=XXXX
  • Related