You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
4.5 KiB

5 years ago
5 years ago
5 years ago
  1. version: "2"
  2. services:
  3. web:
  4. image: nginx
  5. restart: always
  6. networks:
  7. default:
  8. aliases:
  9. - loc.10ballov
  10. volumes:
  11. - ${PROJECTS_DIR}:/usr/share/nginx/html
  12. - ./config/nginx/conf.d:/etc/nginx/conf.d
  13. - ./config/nginx/includes.d:/etc/nginx/includes.d
  14. - ./log/nginx:/var/log/nginx
  15. ports:
  16. - "80:80"
  17. - "443:443"
  18. expose:
  19. - 80
  20. php-fpm:
  21. build:
  22. context: ./dockerfiles/php-fpm
  23. args:
  24. - INSTALL_XDEBUG=${INSTALL_XDEBUG}
  25. - INSTALL_REDIS=${INSTALL_REDIS}
  26. - INSTALL_PEAR_MAIL=${INSTALL_PEAR_MAIL}
  27. - INSTALL_ZIP=${INSTALL_ZIP}
  28. - INSTALL_BZ2=${INSTALL_BZ2}
  29. - INSTALL_INTL=${INSTALL_INTL}
  30. - PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG}
  31. - PHP_OPT_MAX_EXECUTION_TIME=${PHP_OPT_MAX_EXECUTION_TIME}
  32. - PHP_OPT_MEMORY_LIMIT=${PHP_OPT_MEMORY_LIMIT}
  33. - PHP_OPT_UPLOAD_MAX_FILESIZE=${PHP_OPT_UPLOAD_MAX_FILESIZE}
  34. restart: always
  35. volumes:
  36. - ${PROJECTS_DIR}:/usr/share/nginx/html
  37. - ./tmp/php-fpm:/tmp/profiling
  38. expose:
  39. - 9000
  40. php7.1-fpm:
  41. build:
  42. context: dockerfiles/php7.1-fpm
  43. args:
  44. - INSTALL_XDEBUG=${INSTALL_XDEBUG}
  45. - INSTALL_REDIS=${INSTALL_REDIS}
  46. - INSTALL_PEAR_MAIL=${INSTALL_PEAR_MAIL}
  47. - INSTALL_ZIP=${INSTALL_ZIP}
  48. - INSTALL_BZ2=${INSTALL_BZ2}
  49. - INSTALL_INTL=${INSTALL_INTL}
  50. - PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG}
  51. - PHP_OPT_MAX_EXECUTION_TIME=${PHP_OPT_MAX_EXECUTION_TIME}
  52. - PHP_OPT_MEMORY_LIMIT=${PHP_OPT_MEMORY_LIMIT}
  53. - PHP_OPT_UPLOAD_MAX_FILESIZE=${PHP_OPT_UPLOAD_MAX_FILESIZE}
  54. restart: always
  55. volumes:
  56. - ${PROJECTS_DIR}:/usr/share/nginx/html
  57. expose:
  58. - 9000
  59. workspace:
  60. build:
  61. context: ./dockerfiles/workspace
  62. args:
  63. - PHP_VERSION=${WORKSPACE_PHP_VERSION}
  64. - PUID=${WORKSPACE_PUID}
  65. - PGID=${WORKSPACE_PGID}
  66. - TZ=${WORKSPACE_TIMEZONE}
  67. - COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
  68. - COMPOSER_AUTH=${WORKSPACE_COMPOSER_AUTH}
  69. - COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
  70. - INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI}
  71. - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
  72. - INSTALL_SSH=${WORKSPACE_INSTALL_SSH}
  73. - SSH_PASSPHRAZE=${WORKSPACE_SSH_PASSPHRAZE}
  74. - INSTALL_FSWATCH=${WORKSPACE_INSTALL_FSWATCH}
  75. - INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
  76. - NODE_VERSION=${WORKSPACE_NODE_VERSION}
  77. - NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
  78. - INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
  79. - YARN_VERSION=${WORKSPACE_YARN_VERSION}
  80. - INSTALL_GULP=${WORKSPACE_INSTALL_GULP}
  81. - INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
  82. - INSTALL_PING=${WORKSPACE_INSTALL_PING}
  83. - INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
  84. restart: always
  85. volumes:
  86. - ${PROJECTS_DIR}:/var/www
  87. extra_hosts:
  88. - "dockerhost:${DOCKER_HOST_IP}"
  89. sphinx:
  90. build: ./dockerfiles/sphinx
  91. restart: always
  92. depends_on:
  93. - db
  94. command: sh -c 'searchd -c /etc/sphinxsearch/sphinx.conf & sleep 10 && while true; do indexer --rotate --all; sleep 7200; done'
  95. volumes:
  96. - /home/dimti/docker-compose-projects/structure/config/sphinx:/etc/sphinxsearch
  97. - /home/dimti/docker-compose-projects/structure/data/sphinx:/var/lib/sphinx/data
  98. - /home/dimti/docker-compose-projects/structure/log/sphinx:/var/log/sphinxsearch
  99. expose:
  100. - "9306"
  101. db:
  102. build: ./dockerfiles/db
  103. restart: always
  104. environment:
  105. MYSQL_ROOT_PASSWORD: 123456
  106. volumes:
  107. - database:/var/lib/mysql
  108. - ./hostfiles:/hostfiles
  109. - ./config/mariadb:/etc/mysql/conf.d
  110. - ./log/mariadb:/var/log/mariadb
  111. ports:
  112. - "3306:3306"
  113. phpmyadmin:
  114. image: phpmyadmin/phpmyadmin
  115. restart: always
  116. environment:
  117. PMA_HOST: db
  118. PMA_USER: root
  119. PMA_PASSWORD: 123456
  120. ports:
  121. - "81:80"
  122. redis:
  123. image: redis
  124. restart: always
  125. command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
  126. volumes:
  127. - ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
  128. elasticsearch:
  129. image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
  130. restart: always
  131. container_name: elasticsearch
  132. environment:
  133. - discovery.type=single-node
  134. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  135. ulimits:
  136. memlock:
  137. soft: -1
  138. hard: -1
  139. mem_limit: 2g
  140. volumes:
  141. - esdata1:/usr/share/elasticsearch/data
  142. expose:
  143. - "9200"
  144. - "9300"
  145. volumes:
  146. database:
  147. esdata1: