docker-compose.yml 965 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. version : '3'
  2. services:
  3. mysql:
  4. container_name: mysql
  5. image: mysql:5.7
  6. build:
  7. context: .
  8. dockerfile: mysql-dockerfile
  9. ports:
  10. - "3306:3306"
  11. volumes:
  12. - ./mysql/conf:/etc/mysql/conf.d
  13. - ./mysql/logs:/logs
  14. - ./mysql/data:/var/lib/mysql
  15. command: [
  16. 'mysqld',
  17. '--innodb-buffer-pool-size=80M',
  18. '--character-set-server=utf8mb4',
  19. '--collation-server=utf8mb4_unicode_ci',
  20. '--default-time-zone=+8:00',
  21. '--lower-case-table-names=1'
  22. ]
  23. environment:
  24. MYSQL_DATABASE: landian
  25. MYSQL_ROOT_PASSWORD: ld123456
  26. landian-server:
  27. container_name: landian-server
  28. build:
  29. context: .
  30. dockerfile: landian-dockerfile
  31. ports:
  32. - "80:80"
  33. volumes:
  34. - ./landian/logs:/home/landian/logs
  35. - ./landian/uploadPath:/home/landian/uploadPath
  36. depends_on:
  37. - landian-mysql
  38. links:
  39. - landian-mysqlw