-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: connect ECONNREFUSED 172.18.0.2:55432 #107
Comments
Default port for poatgres is 5432 not 55432 |
it worked after changing mapping to default port ,, thank you but now it is not creating the user as expected . i get
|
Ahmed, Try with the default settings first. For example:
You'll need to set these items as env vars, in the .env file. For "someKeyFromRandomKeyGenerator" I recommend using a key generator to generate a random key for those items. These are all the items you'll need in the .env file. And this assumes you have the project use postgres as the database. DATABASE_CLIENT=postgres
DATABASE_HOST=localhost
DATABASE_NAME=strapi
DATABASE_USERNAME=strapi
DATABASE_PASSWORD=someGoodPassword
DATABASE_PORT=5432
JWT_SECRET=someKeyFromRandomKeyGenerator
ADMIN_JWT_SECRET=someKeyFromRandomKeyGenerator
NODE_ENV=development
# has to be 0.0.0.0 to be reached by laptop running locally
HOST=0.0.0.0
# HOST=localhost
PORT=1337
APP_KEYS=someKeyFromRandomKeyGenerator1,someKeyFromRandomKeyGenerator2,someKeyFromRandomKeyGenerator3,someKeyFromRandomKeyGenerator4
API_TOKEN_SALT=someKeyFromRandomKeyGenerator
TRANSFER_TOKEN_SALT=someKeyFromRandomKeyGenerator |
π Bug Report
Im have this error when i try to run
docker compose up --build
:Error: connect ECONNREFUSED 172.18.0.2:55432
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
π€·ββοΈ What did you do
i have used the tool to generate the
dockerfile
anddocker-compose.yaml
file .. then i tried to run the app usingdocker compose up --build
, defined hosts for db aslocalhost
and port as55432
my docker compose file :
βοΈ Error log
Error: connect ECONNREFUSED 172.18.0.2:55432
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
π΅οΈββοΈ Stack trace
The text was updated successfully, but these errors were encountered: