小编nev*_*ner的帖子

带有 PostgreSQL 的 CI/CD 管道因“数据库未初始化且未指定超级用户密码”错误而失败

我正在将 Bitbucket 管道与 PosgreSQL 一起用于 CI/CD。根据此文档, PostgreSQL 服务是这样描述的bitbucket-pipelines.yml

definitions:
  services:
    postgres:
      image: postgres:9.6-alpine
Run Code Online (Sandbox Code Playgroud)

直到现在它工作得很好。但是我所有最新的管道都失败了,并出现以下错误:

   Error: Database is uninitialized and superuser password is not specified.
   You must specify POSTGRES_PASSWORD for the superuser. Use
   "-e POSTGRES_PASSWORD=password" to set it in "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
Run Code Online (Sandbox Code Playgroud)

我该如何解决?bitbucket-pipelines.yml文件中没有任何更改,这可能是此类错误的原因..

postgresql pipeline docker

22
推荐指数
2
解决办法
8922
查看次数

标签 统计

docker ×1

pipeline ×1

postgresql ×1