У меня есть docker -композитный файл, запускающий службы kong и konga. Kong запускается правильно, но konga завершается ошибкой с ошибкой, приведенной ниже:
debug: Preparing database...
Using postgres DB Adapter.
Failed to connect to DB { error: password authentication failed for user "kong"
at Connection.parseE (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
at Connection.parseMessage (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:366:17)
at Socket.<anonymous> (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:105:22)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 100,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '333',
routine: 'auth_failed' }
В моем docker -compose служба Kong работает со своей страницы github и работает нормально .. Я считаю, что проблема с Конгой. Сервис Конга ниже:
version: '2.1'
volumes:
kong_data: {}
services:
db:
image: postgres:latest
environment:
POSTGRES_DB: ${KONG_PG_DATABASE:-kong}
POSTGRES_PASSWORD: ${KONG_PG_PASSWORD:-kong}
POSTGRES_USER: ${KONG_PG_USER:-kong}
healthcheck:
test: ["CMD", "pg_isready", "-U", "${KONG_PG_USER:-kong}"]
interval: 30s
timeout: 30s
retries: 3
restart: on-failure
stdin_open: true
tty: true
networks:
- kong_net
volumes:
- kong_data:/var/lib/postgresql/data
konga-prepare:
image: pantsel/konga:latest
command: “-c prepare -a postgres -u postgresql://kong@db:5432/konga_db”
networks:
- kong_net
restart: on-failure
links:
- db
depends_on:
- db
konga:
image: pantsel/konga:latest
restart: always
networks:
- kong_net
environment:
DB_ADAPTER: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: konga
DB_PASSWORD:
TOKEN_SECRET: km1GUr4RkcQD7DewhJPNXrCuZwcKmqjb
DB_DATABASE: konga_db
NODE_ENV: production
depends_on:
- db
ports:
- "1337:1337"
Как мне решить ошибку аутентификации?