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.

176 lines
5.7 KiB

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. workspace_alex2911:
  90. build:
  91. context: ./dockerfiles/workspace
  92. args:
  93. - PHP_VERSION=${WORKSPACE_PHP_VERSION}
  94. - PUID=${WORKSPACE_PUID}
  95. - PGID=${WORKSPACE_PGID}
  96. - TZ=${WORKSPACE_TIMEZONE}
  97. - COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
  98. - COMPOSER_AUTH=${WORKSPACE_COMPOSER_AUTH}
  99. - COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
  100. - INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI}
  101. - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
  102. - INSTALL_SSH=${WORKSPACE_INSTALL_SSH}
  103. - SSH_PASSPHRAZE=${WORKSPACE_SSH_PASSPHRAZE}
  104. - INSTALL_FSWATCH=${WORKSPACE_INSTALL_FSWATCH}
  105. - INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
  106. - NODE_VERSION=${WORKSPACE_NODE_VERSION}
  107. - NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
  108. - INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
  109. - YARN_VERSION=${WORKSPACE_YARN_VERSION}
  110. - INSTALL_GULP=${WORKSPACE_INSTALL_GULP}
  111. - INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
  112. - INSTALL_PING=${WORKSPACE_INSTALL_PING}
  113. - INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
  114. restart: always
  115. volumes:
  116. - ${PROJECTS_DIR}:/var/www
  117. extra_hosts:
  118. - "dockerhost:${DOCKER_HOST_IP}"
  119. sphinx:
  120. build: ./dockerfiles/sphinx
  121. restart: always
  122. depends_on:
  123. - db
  124. command: sh -c 'searchd -c /etc/sphinxsearch/sphinx.conf & sleep 10 && while true; do indexer --rotate --all; sleep 7200; done'
  125. volumes:
  126. - /home/dimti/docker-compose-projects/structure/config/sphinx:/etc/sphinxsearch
  127. - /home/dimti/docker-compose-projects/structure/data/sphinx:/var/lib/sphinx/data
  128. - /home/dimti/docker-compose-projects/structure/log/sphinx:/var/log/sphinxsearch
  129. expose:
  130. - "9306"
  131. db:
  132. image: mariadb
  133. restart: always
  134. environment:
  135. MYSQL_ROOT_PASSWORD: 123456
  136. volumes:
  137. - database:/var/lib/mysql
  138. - ./hostfiles:/hostfiles
  139. ports:
  140. - "3306:3306"
  141. phpmyadmin:
  142. image: phpmyadmin/phpmyadmin
  143. restart: always
  144. environment:
  145. PMA_HOST: db
  146. PMA_USER: root
  147. PMA_PASSWORD: 123456
  148. ports:
  149. - "81:80"
  150. redis:
  151. image: redis
  152. restart: always
  153. command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
  154. volumes:
  155. - ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
  156. elasticsearch:
  157. image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
  158. restart: always
  159. container_name: elasticsearch
  160. environment:
  161. - discovery.type=single-node
  162. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  163. ulimits:
  164. memlock:
  165. soft: -1
  166. hard: -1
  167. mem_limit: 2g
  168. volumes:
  169. - esdata1:/usr/share/elasticsearch/data
  170. expose:
  171. - "9200"
  172. - "9300"
  173. volumes:
  174. database:
  175. esdata1: