docker-compose.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. version: '3.2'
  2. services:
  3. nginx:
  4. image: "${NGINX_VERSION}"
  5. ports:
  6. - 80:80
  7. - 443:443
  8. volumes:
  9. - ./log/nginx:/var/log/nginx
  10. - ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf
  11. - ./etc/nginx/conf.d:/etc/nginx/conf.d
  12. - ./etc/nginx/ssl:/etc/nginx/ssl
  13. - ./wwwroot:/var/www
  14. environment:
  15. ENABLE_CRONTAB: "true"
  16. TZ: ${TZ}
  17. restart: on-failure
  18. php-fpm:
  19. # image: "${PHP_VERSION}"
  20. build: ./Docker/php-fpm/
  21. volumes:
  22. - ./etc/php-fpm/php-fpm.ini:/usr/local/etc/php-fpm.ini
  23. # - ./etc/php-fpm/crontabs:/etc/crontabs
  24. - ./wwwroot:/var/www
  25. environment:
  26. ENABLE_CRONTAB: "true"
  27. TZ: ${TZ}
  28. restart: on-failure
  29. mysql:
  30. image: "${MYSQL_VERSION}"
  31. # command: --default-authentication-plugin=mysql_native_password
  32. volumes:
  33. # - ./etc/mysql/my.cnf:/etc/my.cnf
  34. # - ./etc/mysql/my.cnf.d:/etc/my.cnf.d
  35. - ./data/mysql/databases:/var/lib/mysql
  36. environment:
  37. MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
  38. MYSQL_ROOT_HOST: "%"
  39. TZ: ${TZ}
  40. restart: on-failure
  41. phpmyadmin:
  42. image: "${PMA_VERSION}"
  43. ports:
  44. - 8081:80
  45. depends_on:
  46. - mysql
  47. environment:
  48. PMA_HOST: mysql
  49. TZ: ${TZ}
  50. restart: on-failure
  51. # redis:
  52. # image: "${REDIS_VERSION}"
  53. # volumes:
  54. # - ./data/redis/data:/data:rw
  55. # environment:
  56. # TZ: ${TZ}
  57. # restart: on-failure