5

I try to up postgresql and adminer via docker container. But from adminer I cannot enter to postgresql with password and user I whote.

SQLSTATE[08006] [7] FATAL: password authentication failed for user "root"

I tried all.

version: '3'

services:
  web:
    build: .
    environment:
      - APACHE_RUN_USER=www-data
    volumes:
      - ./blog:/var/www/html/
    ports:
      - 8080:80
    working_dir: /var/www/html/
  db:
    image: postgres
    restart: always
    environment:
      POSTGRES_PASSWORD: kisphp
      POSTGRES_USER: root
      POSTGRES_DB: kisphp
    ports:
      - "5432:5432"
    volumes:
      - ./postgres:/var/lib/postgresql/data
  adminer:
    image: adminer
    restart: always
    ports:
      - "6080:8080"

1 Answers1

2

This docker-compose configuration works well.

Try recreating it from scratch:

  1. Delete ./postgres folder
  2. docker-compose stop
  3. docker-compose down
  4. docker-compose up -d
Alex Pliutau
  • 21,392
  • 27
  • 113
  • 143