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.

172 lines
5.1 KiB

5 years ago
5 years ago
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_VERSION=${WORKSPACE_COMPOSER_VERSION}
  68. - COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
  69. - COMPOSER_AUTH=${WORKSPACE_COMPOSER_AUTH}
  70. - COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
  71. - INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI}
  72. - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
  73. - INSTALL_SSH=${WORKSPACE_INSTALL_SSH}
  74. - SSH_PASSPHRAZE=${WORKSPACE_SSH_PASSPHRAZE}
  75. - INSTALL_FSWATCH=${WORKSPACE_INSTALL_FSWATCH}
  76. - INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
  77. - NODE_VERSION=${WORKSPACE_NODE_VERSION}
  78. - NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
  79. - INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
  80. - YARN_VERSION=${WORKSPACE_YARN_VERSION}
  81. - INSTALL_GULP=${WORKSPACE_INSTALL_GULP}
  82. - INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
  83. - INSTALL_PING=${WORKSPACE_INSTALL_PING}
  84. - INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
  85. restart: always
  86. volumes:
  87. - ${PROJECTS_DIR}:/var/www
  88. extra_hosts:
  89. - "dockerhost:${DOCKER_HOST_IP}"
  90. sphinx:
  91. build: ./dockerfiles/sphinx
  92. restart: always
  93. depends_on:
  94. - db
  95. command: sh -c 'searchd -c /etc/sphinxsearch/sphinx.conf & sleep 10 && while true; do indexer --rotate --all; sleep 7200; done'
  96. volumes:
  97. - /home/dimti/docker-compose-projects/structure/config/sphinx:/etc/sphinxsearch
  98. - /home/dimti/docker-compose-projects/structure/data/sphinx:/var/lib/sphinx/data
  99. - /home/dimti/docker-compose-projects/structure/log/sphinx:/var/log/sphinxsearch
  100. expose:
  101. - "9306"
  102. db:
  103. build: ./dockerfiles/db
  104. restart: always
  105. environment:
  106. MYSQL_ROOT_PASSWORD: 123456
  107. volumes:
  108. - database:/var/lib/mysql
  109. - ./hostfiles:/hostfiles
  110. - ./config/mariadb:/etc/mysql/conf.d
  111. - ./log/mariadb:/var/log/mariadb
  112. ports:
  113. - "3306:3306"
  114. phpmyadmin:
  115. image: phpmyadmin/phpmyadmin
  116. restart: always
  117. environment:
  118. PMA_HOST: db
  119. PMA_USER: root
  120. PMA_PASSWORD: 123456
  121. ports:
  122. - "81:80"
  123. dbpg:
  124. image: postgres
  125. restart: always
  126. environment:
  127. POSTGRES_PASSWORD: postgres
  128. volumes:
  129. - databasepg:/var/lib/postgresql/data
  130. - /data/hostfiles:/hostfiles
  131. adminer:
  132. image: adminer
  133. restart: always
  134. ports:
  135. - 8080:8080
  136. pgadmin:
  137. image: dpage/pgadmin4
  138. restart: always
  139. environment:
  140. PGADMIN_DEFAULT_EMAIL: info@wpstudio.ru
  141. PGADMIN_DEFAULT_PASSWORD: postgres
  142. ports:
  143. - "83:80"
  144. volumes:
  145. - /data/hostfiles/pgadmin:/var/lib/pgadmin
  146. redis:
  147. image: redis
  148. restart: always
  149. command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
  150. volumes:
  151. - ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
  152. elasticsearch:
  153. image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
  154. restart: always
  155. container_name: elasticsearch
  156. environment:
  157. - discovery.type=single-node
  158. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  159. ulimits:
  160. memlock:
  161. soft: -1
  162. hard: -1
  163. mem_limit: 2g
  164. volumes:
  165. - esdata1:/usr/share/elasticsearch/data
  166. expose:
  167. - "9200"
  168. - "9300"
  169. volumes:
  170. database:
  171. esdata1: