docker-compose.yml 853 B

1234567891011121314151617181920212223242526272829303132333435
  1. version: '3'
  2. services:
  3. mysql57:
  4. image: mysql:5.7
  5. container_name: mysql
  6. ports:
  7. - "3306:3306"
  8. command:
  9. --character-set-server=utf8
  10. --collation-server=utf8_general_ci
  11. --default-authentication-plugin=mysql_native_password
  12. volumes:
  13. - ./db/conf.d:/etc/mysql/conf.d
  14. - ./db/data:/var/lib/mysql
  15. - ./db/init-sql:/docker-entrypoint-initdb.d
  16. environment:
  17. MYSQL_ROOT_PASSWORD: litemall123456
  18. restart: always
  19. litemall:
  20. build:
  21. context: litemall
  22. dockerfile: Dockerfile
  23. container_name: litemall
  24. ports:
  25. - "8080:8080"
  26. volumes:
  27. - ./litemall/storage:/storage
  28. - ./litemall/logs:/logs
  29. - ./litemall/backup:/backup
  30. - /etc/localtime:/etc/localtime
  31. environment:
  32. - TZ=Asia/Shanghai
  33. depends_on:
  34. - mysql57
  35. restart: always