Pushkin无法初始化PostgreSQL数据库

问题描述 投票:0回答:1

我正在关注Pushkin Quickstart guide

pushkin init site,我得到一个错误,找不到test_db_1的容器:

...
Pulling test_db (postgres:11)...
11: Pulling from library/postgres
Digest: sha256:8e096175da9b7a1d5f073e4ff0b2058a68b3110dc9c26bcee0975d25ad1c008e
Status: Downloaded newer image for postgres:11
Creating pushkin_test_db_1       ... done
Creating pushkin_message-queue_1 ... done
Creating pushkin_api_1           ... done
Creating pushkin_server_1        ... done
Starting test_db ... done
Creating local test database
No container found for test_db_1
Failed to run create database command in test_db container: 1

如果我打开Docker Desktop> pushkin> pushkin_test_db_1>日志,我看到

Error: Database is uninitialized and superuser password is not specified. 
You must specify POSTGRES_PASSWORD to a non-empty value for the superuser. 
For example, "-e POSTGRES_PASSWORD=password" on "docker run". 
You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all connections without a password. 
This is *not* recommended. See PostgreSQL documentation about "trust": 
https://www.postgresql.org/docs/current/auth-trust.html

我尝试打开./pushkin.yaml,在其中添加密码,然后运行pushkin init site,但没有任何改变。我的猜测是,Creating pushkin_test_db_1代表的命令没有向Docker提供数据库密码。观察postgres github,此行为似乎是一个新的“功能”。

是否有人建议解决此问题?

postgresql docker docker-compose
1个回答
0
投票

这是CLI的同步问题。有时,再次运行“ pushkin初始化站点”即可。试试看,让我知道您是否遇到其他错误。

© www.soinside.com 2019 - 2024. All rights reserved.