You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker run -e DATABASE_URL=postgres://blink:pass@192.168.0.120/blink ghcr.io/janejeon/blink:latest npm run db:migrate
To Reproduce
Steps to reproduce the behavior:
docker pull ghcr.io/janejeon/blink:latest
docker run -e DATABASE_URL=postgres://blink:pass@192.168.0.120/blink ghcr.io/janejeon/blink:latest npm run db:migrate
See error "Invalid URL"
Expected behavior
The migration will be successful
Log
# docker run -e DATABASE_URL=postgres://blink:pass@192.168.0.120/blink ghcr.io/janejeon/blink:latest npm run db:migrate
db:migrate
knex migrate:latest
Invalid URL
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:371:5)
at onParseError (node:internal/url:552:9)
at new URL (node:internal/url:628:5)
at Object. (/home/node/models/link.js:10:16)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
npm notice
npm notice New minor version of npm available! 8.5.0 -> 8.19.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.19.2
npm notice Run npm install -g npm@8.19.2 to update!
npm notice
The text was updated successfully, but these errors were encountered:
It is not the database (see how literally nowhere in the error message does it say DATABASE_URL or knex?).
In fact, if you look closely at the error message, you'll see that it is from not configuring the necessary environment variables, which I've extensively documented in both the .env files and the documentation:
Invalid URL
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:371:5)
at onParseError (node:internal/url:552:9)
at new URL (node:internal/url:628:5)
at Object. (/home/node/models/link.js:10:16) <---------- here
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
Please, please, PLEASE for the love of God read the docs. I specifically have a section for deploying with Docker, and I specifically point out in the issue description (that you deleted) that you NEED to read the docs first.
I'm not sure how more explicit about "PLEASE READ THE DOCS" I could've gotten, but clearly you haven't done it.
Please go ahead and read the docs.
Repository owner
locked as resolved and limited conversation to collaborators
Oct 7, 2022
Describe the bug
When using the ip address in DATABASE_URL, an error is returned. I checked, this only happens when using an ip address.
Deployment Method
docker pull ghcr.io/janejeon/blink:latest
docker run -e DATABASE_URL=postgres://blink:pass@192.168.0.120/blink ghcr.io/janejeon/blink:latest npm run db:migrate
To Reproduce
Steps to reproduce the behavior:
192.168.0.120
/blink ghcr.io/janejeon/blink:latest npm run db:migrateExpected behavior
The migration will be successful
Log
The text was updated successfully, but these errors were encountered: