Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo docker build -t PROJECT_NAME .
- db:
- image: mysql
- command: --default-authentication-plugin=mysql_native_password
- restart: always
- networks:
- - webnet
- environment:
- MYSQL_ROOT_PASSWORD: passwordroot
- Unhandled rejection SequelizeConnectionError: Client does not support authentication protocol requested byserver; consider upgrading MySQL client
- const sequelize = new Sequelize(
- process.env.TEST_DB || process.env.MYSQL_DATABASE,
- 'root',
- process.env.MYSQL_ROOT_PASSWORD,
- {
- host: process.env.DB_HOST || 'localhost',
- operatorsAliases: Sequelize.Op,
- dialect: 'mysql',
- define: {
- underscored: true
- }
- }
- );
- web:
- image: PROJECT_NAME
- ports:
- - 8080:8080
- networks:
- - webnet
- environment:
- DB_HOST: db
- command: ["./wait-for-it.sh", "mysql:3306", "--", "node", "index.js"]
Add Comment
Please, Sign In to add comment