Я пытаюсь перенести мою базу данных, используя knex и postgres в базе данных.
docker -compose.yml
docker -compose.yml
version: "3.1"
services:
db:
image: "postgres:latest"
restart: always
volumes:
- ./docker-data/db-data:/var/lib/postgresql
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5432:5432"
adminer:
depends_on:
- db
image: adminer
restart: always
ports:
- "8080:8080"
knexfile. js
require("dotenv").config();
module.exports = {
development: {
client: "pg",
connection: {
database: process.env.POSTGRES_DB,
user: process.env.POSTGRES_USER,
password: process.env.POSTGRES_PASSWORD
},
migrations: {
directory: "./db/migrations"
}
}
};
$ npx knex migrate: последний
Вывод:
error: authentification password to user admin
at Connection.parseE (C:\Users\Youssef\Desktop\Home\projects\restaurant-app\server\node_modules\pg\lib\connection.js:600:48)
at Connection.parseMessage (C:\Users\Youssef\Desktop\Home\projects\restaurant-app\server\node_modules\pg\lib\connection.js:399:19)
at Socket.<anonymous> (C:\Users\Youssef\Desktop\Home\projects\restaurant-app\server\node_modules\pg\lib\connection.js:115:22)
at Socket.emit (events.js:321:20)
at addChunk (_stream_readable.js:305:12)
at readableAddChunk (_stream_readable.js:280:11)
at Socket.Readable.push (_stream_readable.js:214:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
Я здесь стекаю любой, кто может помогите мне.
больше информации:
os: windows 7