docker-compose.debug.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. version: '3.4'
  2. services:
  3. # php-server:
  4. # image: jianboy/syoqi:latest
  5. # build:
  6. # context: .
  7. # dockerfile: ./Dockerfile
  8. # command: [ "sh", "-c", "php -S " ]
  9. # ports:
  10. # - 8080:8080
  11. # volumes:
  12. # - .:/var/www/html
  13. # networks:
  14. # - default
  15. # depends_on:
  16. # - mysql
  17. # # - redis
  18. nginx:
  19. container_name: survey_nginx
  20. image: nginx:alpine
  21. restart: always
  22. ports:
  23. - 8081:80
  24. # depends_on:
  25. # - phpfpm
  26. environment:
  27. - TZ=Asia/Shanghai
  28. working_dir: /var/www
  29. # volumes_from:
  30. # - phpfpm
  31. volumes:
  32. - ./nginx/vhost.conf:/etc/nginx/conf.d/default.conf
  33. - ./nginx/log:/etc/nginx/log
  34. - ./../web:/var/www/public
  35. networks:
  36. survey_net:
  37. ipv4_address: 192.168.10.80
  38. # mysql:
  39. # container_name: survey_mysql
  40. # image: mysql:5.7
  41. # environment:
  42. # MYSQL_ROOT_PASSWORD: root
  43. # MYSQL_DATABASE: test
  44. # MYSQL_USER: lyq
  45. # MYSQL_PASSWORD: 123456
  46. # ports:
  47. # - 3306:3306
  48. # volumes:
  49. # # - mysql:/var/lib/mysql
  50. # - ./mysql/my.cnf:/etc/mysql/my.cnf
  51. # - ./mysql/data:/var/lib/mysql
  52. # - ./mysql/log:/var/log/mysql
  53. # # privileged: true
  54. # command:
  55. # --character-set-server=utf8mb4
  56. # --collation-server=utf8mb4_general_ci
  57. # --explicit_defaults_for_timestamp=true
  58. # --lower_case_table_names=1
  59. # --max_allowed_packet=128M
  60. # --default-authentication-plugin=mysql_native_password
  61. # --sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
  62. # working_dir: /var/lib/mysql
  63. # networks:
  64. # survey_net:
  65. # ipv4_address: 192.168.10.81
  66. # redis:
  67. # image: redis:latest
  68. # ports:
  69. # - 6379:6379
  70. # volumes:
  71. # - redis:/data
  72. # networks:
  73. # - survey_net
  74. networks:
  75. survey_net:
  76. driver: bridge
  77. ipam: #网络配置
  78. config:
  79. - subnet: 192.168.0.0/16 #IP区间
  80. gateway: 192.168.10.100
  81. # volumes:
  82. # mysql:
  83. # external:
  84. # name: mysql
  85. # redis:
  86. # external:
  87. # name: redis