docker-compose.yml 892 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. version: '3'
  2. services:
  3. mysql1:
  4. container_name: mysql1
  5. command: --default-authentication-plugin=mysql_native_password
  6. image: "mysql"
  7. ports:
  8. - "3307:3307"
  9. environment:
  10. - MYSQL_ROOT_PASSWORD=mysql1
  11. - MYSQL_TCP_PORT=3307
  12. - MYSQL_USER=monitoruser
  13. - MYSQL_PASSWORD=monitorpass
  14. - MYSQL_DATABASE=application
  15. mysql2:
  16. container_name: mysql2
  17. image: "mysql"
  18. ports:
  19. - "3308:3308"
  20. environment:
  21. - MYSQL_ROOT_PASSWORD=mysql2
  22. - MYSQL_TCP_PORT=3308
  23. - MYSQL_USER=monitoruser
  24. - MYSQL_PASSWORD=monitorpass
  25. - MYSQL_DATABASE=application
  26. mysqlproxy:
  27. container_name: mysqlproxy
  28. image: "proxysql/proxysql"
  29. volumes:
  30. - ./proxysql.cnf:/etc/proxysql.cnf
  31. links:
  32. - "mysql1:mysql1"
  33. - "mysql2:mysql2"
  34. ports:
  35. - "16032:6032"
  36. - "16033:6033"
  37. - "16070:6070"