docker-compose.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. version: '3'
  2. networks:
  3. default:
  4. driver: bridge
  5. services:
  6. nginx:
  7. container_name: ${ABBREVIATION}-nginx
  8. image: docker.io/nginx:1.23.0
  9. restart: always
  10. depends_on:
  11. - "php"
  12. volumes:
  13. - ./www:/www
  14. - ./config/nginx/conf.d:/etc/nginx/conf.d
  15. - ./logs/nginx/logs:/logs
  16. networks:
  17. - default
  18. ports:
  19. - "${NUMBER}080:80"
  20. php:
  21. container_name: ${ABBREVIATION}-php
  22. image: registry.cn-qingdao.aliyuncs.com/kphcdr/kt
  23. restart: always
  24. working_dir: /www/server
  25. volumes:
  26. - ./www:/www
  27. - ./config/php/php.ini:/usr/local/etc/php/php.ini
  28. networks:
  29. - default
  30. mysql:
  31. container_name: ${ABBREVIATION}-mysql
  32. image: mysql:8.0.34
  33. restart: always
  34. ports:
  35. - "${NUMBER}3306:3306"
  36. volumes:
  37. - ./data/mysql/lib:/var/lib/mysql
  38. - ./config/mysql/mysqld.cnf:/etc/mysql/my.cnf
  39. environment:
  40. MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
  41. TZ: "Asia/Shanghai"
  42. networks:
  43. - default
  44. redis:
  45. container_name: ${ABBREVIATION}-redis
  46. image: docker.io/redis:6.2.7
  47. restart: always
  48. volumes:
  49. - ./data/redis:/data
  50. networks:
  51. - default
  52. ports:
  53. - "${NUMBER}6379:6379"
  54. #node:
  55. # container_name: ${ABBREVIATION}-node
  56. # image: node:16.16.0
  57. # restart: always
  58. # tty: true
  59. # volumes:
  60. # - ./www:/www
  61. # networks:
  62. # - default
  63. # working_dir: /www