Closed hhharsha36 closed 5 months ago
This is because the db
container is hardcoded in the Dockerfile
You should be able to fix it with:
services:
api:
command: ["start.sh", "${DB_HOST}", "${DB_PORT}", "yarn", "start"]
Thanks for your quick response @XeR
I am getting the below error when I made the proposed change:
ctfnote_api | /app/start.sh:2
ctfnote_api | readonly MAX_RETRIES=5
ctfnote_api | ^^^^^^^^^^^
ctfnote_api |
ctfnote_api | SyntaxError: Unexpected identifier
ctfnote_api | at Object.compileFunction (node:vm:352:18)
ctfnote_api | at wrapSafe (node:internal/modules/cjs/loader:1033:15)
ctfnote_api | at Module._compile (node:internal/modules/cjs/loader:1069:27)
ctfnote_api | at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
ctfnote_api | at Module.load (node:internal/modules/cjs/loader:981:32)
ctfnote_api | at Function.Module._load (node:internal/modules/cjs/loader:822:12)
ctfnote_api | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
ctfnote_api | at node:internal/main/run_main_module:17:47
Oops ! I meant ./start.sh
instead of start.sh
Changing it to ./start.sh
worked.
Below is the complete command if anyone else is facing the same issue:
services:
api:
command: ["./start.sh", "${DB_HOST}", "${DB_PORT}", "yarn", "start"]
Reopening this because this should be fixed
Closing since https://github.com/TFNS/CTFNote/pull/235 is closed
Below is my
docker-compose
fileWhen I start the stack, I am getting the following error from
ctfnote_api
The
DB_HOST
value ishost.docker.internal
and the host and port refers to Postgres deployed on a separate container. Thectfnote
user has owner access toctfnote
db and I have cross-verified it manually as well.Yet I do not know why I getting the
bad address db error
.