@rustered_ML psqlコマンドではソケットで、yarn run initではlocalhostで接続しているかも。
pg_hba.confの、localで始まる行と、hostで始まる行ね。
@rustered_ML -h ヌキで入れない、-h xxx.xxx.xxx.xxx だと入れるっていうことであれば、
.config/default.yml のdbにhostを指定してないとかかな?
db:
host: xxx.xxx.xxx.xxx
port: 5432
@noellabo@fedibird.com 一応hostは指定してありますね。スペルミス等も無いとは思うんですが...
@rustered_ML db, user, pass もpsqlと一致していたら、つながらないとおかしいですねー。
db:
host: xxx.xxx.xxx.xxx
port: 5432
# Database name
db: misskey
# Auth
user: misskey
pass: XXXXXXXXXXXX
に対して、
psql -h xxx.xxx.xxx.xxx -p 5432 -d misskey -U misskey
という対応関係かな。
@noellabo@fedibird.com そうですね、ちゃんとその対応関係になってるのも確認してるんですが、yarnだと接続できないという状態ですね...
@rustered_ML そしたらormconfig.jsの方かな。
こんな感じになってます?
const config = require('./built/config').default;
const entities = require('./built/db/postgre').entities;
module.exports = {
type: 'postgres',
host: config.db.host,
port: config.db.port,
username: config.db.user,
password: config.db.pass,
database: config.db.db,
extra: config.db.extra,
entities: entities,
migrations: ['migration/*.ts'],
cli: {
migrationsDir: 'migration'
}
};
@noellabo@fedibird.com そうですね、確認しましたが全く同じ形になってます
const config = require('./built/config').default;
const entities = require('./built/db/postgre').entities;
module.exports = {
type: 'postgres',
host: config.db.host,
port: config.db.port,
username: config.db.user,
password: config.db.pass,
database: config.db.db,
extra: config.db.extra,
entities: entities,
migrations: ['migration/*.ts'],
cli: {
migrationsDir: 'migration'
}
};
@noellabo@fedibird.com ↓のやつを試してみたら
-h
抜かすとたしかに入れなかったので、おそらくはそうだと思われます...https://teratail.com/questions/301103
問題はこのDBサーバがDOのマネージドDBなんでpg_hba.confっていうかその辺りの設定変える方法が不明なんですが、ちょとtその辺りは自分で調べてみます。
ありがとうございました