Guest User

Untitled

a guest
Jul 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. sudo docker build -t PROJECT_NAME .
  2.  
  3. db:
  4. image: mysql
  5. command: --default-authentication-plugin=mysql_native_password
  6. restart: always
  7. networks:
  8. - webnet
  9. environment:
  10. MYSQL_ROOT_PASSWORD: passwordroot
  11.  
  12. Unhandled rejection SequelizeConnectionError: Client does not support authentication protocol requested byserver; consider upgrading MySQL client
  13.  
  14. const sequelize = new Sequelize(
  15. process.env.TEST_DB || process.env.MYSQL_DATABASE,
  16. 'root',
  17. process.env.MYSQL_ROOT_PASSWORD,
  18. {
  19. host: process.env.DB_HOST || 'localhost',
  20. operatorsAliases: Sequelize.Op,
  21. dialect: 'mysql',
  22. define: {
  23. underscored: true
  24. }
  25. }
  26. );
  27.  
  28. web:
  29. image: PROJECT_NAME
  30. ports:
  31. - 8080:8080
  32. networks:
  33. - webnet
  34. environment:
  35. DB_HOST: db
  36. command: ["./wait-for-it.sh", "mysql:3306", "--", "node", "index.js"]
Add Comment
Please, Sign In to add comment