我尝试通过 docker 容器启动 postgresql 和 adminer。但是从管理员那里我无法使用密码和我喜欢的用户进入 postgresql。
SQLSTATE[08006] [7] FATAL: password authentication failed for user "root"
我都试过了。
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"