ylliX - Online Advertising Network

Connection refused with MYSQL db when node app dockerized

I have a problem with connecting my node app container to MySQL database. When -compose up I keep getting error from container logs: server-1 | Unable to connect to database ConnectionRefusedError [SequelizeConnectionRefusedError]: connect ECONNREFUSED 172.20.0.2:3306 Here is my db instance: const { Sequelize } = require(“sequelize”); require(“dotenv”).config(); const sequelize = new Sequelize(“admin”, “password”, “table”, { […]