docker-compose.yaml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. redis:
  27. image: redis:5.0
  28. ports:
  29. - "6379:6379"
  30. restart: always
  31. landian-server:
  32. container_name: landian-server
  33. build:
  34. context: .
  35. dockerfile: landian-dockerfile
  36. ports:
  37. - "80:80"
  38. volumes:
  39. - ./landian/logs:/home/landian/logs
  40. - ./landian/uploadPath:/home/landian/uploadPath
  41. depends_on:
  42. - landian-mysql
  43. links:
  44. - landian-mysqlw