docker-compose.yml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. version: '2'
  2. services:
  3. ### Workspace Utilities Container ###########################
  4. workspace:
  5. build:
  6. context: ./workspace
  7. args:
  8. - INSTALL_XDEBUG=false
  9. - INSTALL_MONGO=false
  10. - INSTALL_NODE=false
  11. - INSTALL_DRUSH=false
  12. - INSTALL_AEROSPIKE_EXTENSION=false
  13. - COMPOSER_GLOBAL_INSTALL=false
  14. - INSTALL_WORKSPACE_SSH=false
  15. - PUID=1000
  16. - PGID=1000
  17. - NODE_VERSION=stable
  18. volumes_from:
  19. - volumes_source
  20. extra_hosts:
  21. # IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
  22. - "dockerhost:10.0.75.1"
  23. ports:
  24. - "22:22"
  25. tty: true
  26. ### PHP-FPM Container #######################################
  27. php-fpm:
  28. build:
  29. context: ./php-fpm
  30. args:
  31. - INSTALL_XDEBUG=false
  32. - INSTALL_MONGO=false
  33. - INSTALL_ZIP_ARCHIVE=false
  34. - INSTALL_MEMCACHED=false
  35. - INSTALL_OPCACHE=false
  36. - INSTALL_AEROSPIKE_EXTENSION=false
  37. dockerfile: Dockerfile-70
  38. volumes_from:
  39. - volumes_source
  40. expose:
  41. - "9000"
  42. links:
  43. - workspace
  44. extra_hosts:
  45. # IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
  46. - "dockerhost:10.0.75.1"
  47. environment:
  48. # IMPORTANT: Set the Remote Interpreter entry matching name to `laravel`
  49. - PHP_IDE_CONFIG="serverName=laravel"
  50. ### Nginx Server Container ##################################
  51. nginx:
  52. build:
  53. context: ./nginx
  54. args:
  55. - PHP_UPSTREAM=php-fpm
  56. volumes_from:
  57. - volumes_source
  58. volumes:
  59. - ./logs/nginx/:/var/log/nginx
  60. ports:
  61. - "80:80"
  62. - "443:443"
  63. links:
  64. - php-fpm
  65. ### Apache Server Container ##################################
  66. apache2:
  67. build:
  68. context: ./apache2
  69. args:
  70. - PHP_SOCKET="php-fpm:9000"
  71. volumes_from:
  72. - volumes_source
  73. volumes:
  74. - ./logs/apache2:/var/log/apache2
  75. ports:
  76. - "80:80"
  77. - "443:443"
  78. links:
  79. - php-fpm
  80. ### HHVM Container ##########################################
  81. hhvm:
  82. build: ./hhvm
  83. volumes_from:
  84. - volumes_source
  85. expose:
  86. - "9000"
  87. links:
  88. - workspace
  89. ### MySQL Container #########################################
  90. mysql:
  91. build: ./mysql
  92. volumes_from:
  93. - volumes_data
  94. ports:
  95. - "3306:3306"
  96. environment:
  97. MYSQL_DATABASE: homestead
  98. MYSQL_USER: homestead
  99. MYSQL_PASSWORD: secret
  100. MYSQL_ROOT_PASSWORD: root
  101. ### PostgreSQL Container ####################################
  102. postgres:
  103. build: ./postgres
  104. volumes_from:
  105. - volumes_data
  106. ports:
  107. - "5432:5432"
  108. environment:
  109. POSTGRES_DB: homestead
  110. POSTGRES_USER: homestead
  111. POSTGRES_PASSWORD: secret
  112. ### MariaDB Container #######################################
  113. mariadb:
  114. build: ./mariadb
  115. volumes_from:
  116. - volumes_data
  117. ports:
  118. - "3306:3306"
  119. environment:
  120. MYSQL_DATABASE: homestead
  121. MYSQL_USER: homestead
  122. MYSQL_PASSWORD: secret
  123. MYSQL_ROOT_PASSWORD: root
  124. ### Neo4j Container #########################################
  125. neo4j:
  126. build: ./neo4j
  127. ports:
  128. - "7474:7474"
  129. - "1337:1337"
  130. environment:
  131. - NEO4J_AUTH=homestead:secret
  132. volumes_from:
  133. - volumes_data
  134. ### MongoDB Container #######################################
  135. mongo:
  136. build: ./mongo
  137. ports:
  138. - "27017:27017"
  139. volumes_from:
  140. - volumes_data
  141. ### Redis Container #########################################
  142. redis:
  143. build: ./redis
  144. volumes_from:
  145. - volumes_data
  146. ports:
  147. - "6379:6379"
  148. ### Aerospike c Container #########################################
  149. aerospike:
  150. build: ./aerospike
  151. volumes_from:
  152. - workspace
  153. - volumes_data
  154. ports:
  155. - "3000:3000"
  156. - "3001:3001"
  157. - "3002:3002"
  158. - "3003:3003"
  159. ### Memcached Container #####################################
  160. memcached:
  161. build: ./memcached
  162. volumes_from:
  163. - volumes_data
  164. ports:
  165. - "11211:11211"
  166. links:
  167. - php-fpm
  168. ### Beanstalkd Container ####################################
  169. beanstalkd:
  170. build: ./beanstalkd
  171. ports:
  172. - "11300:11300"
  173. privileged: true
  174. links:
  175. - php-fpm
  176. ### RabbitMQ Container ####################################
  177. rabbitmq:
  178. build: ./rabbitmq
  179. ports:
  180. - "5672:5672"
  181. - "15671:15671"
  182. - "8080:15672"
  183. privileged: true
  184. environment:
  185. RABBITMQ_DEFAULT_USER: guest
  186. RABBITMQ_DEFAULT_PASS: guest
  187. links:
  188. - php-fpm
  189. ### Beanstalkd Console Container ############################
  190. beanstalkd-console:
  191. build: ./beanstalkd-console
  192. ports:
  193. - "2080:2080"
  194. links:
  195. - beanstalkd
  196. ### Caddy Server Container ##################################
  197. caddy:
  198. build: ./caddy
  199. volumes_from:
  200. - volumes_source
  201. ports:
  202. - "80:80"
  203. - "443:443"
  204. - "2015:2015"
  205. volumes:
  206. - ./caddy/Caddyfile:/etc/Caddyfile
  207. - ./logs/caddy:/var/log/caddy
  208. links:
  209. - php-fpm
  210. ### phpMyAdmin Container ##################################
  211. phpmyadmin:
  212. build: ./phpmyadmin
  213. environment:
  214. PMA_ARBITRARY: 1
  215. MYSQL_USER: homestead
  216. MYSQL_PASSWORD: secret
  217. MYSQL_ROOT_PASSWORD: root
  218. volumes_from:
  219. - volumes_data
  220. ports:
  221. - "8080:80"
  222. links:
  223. # for mysql container
  224. - "mysql:db"
  225. # for mariadb container
  226. # - "mariadb:db"
  227. ### pgAdmin Container ##################################
  228. pgadmin:
  229. build: ./pgadmin
  230. ports:
  231. - "5050:5050"
  232. links:
  233. - postgres
  234. ### ElasticSearch Container ##################################
  235. elasticsearch:
  236. build: ./elasticsearch
  237. volumes_from:
  238. - volumes_data
  239. ports:
  240. - "9200:9200"
  241. - "9300:9300"
  242. links:
  243. - php-fpm
  244. ### Laravel Application Code Container ######################
  245. volumes_source:
  246. image: tianon/true
  247. volumes:
  248. - ../:/var/www/laravel
  249. # Demonstration of how to mount multiple sites
  250. # - ../../site_a/:/var/www/site_a
  251. # - ../../site_b/:/var/www/site_b
  252. ### Databases Data Container ################################
  253. volumes_data:
  254. image: tianon/true
  255. volumes:
  256. - ./data/mysql:/var/lib/mysql
  257. - ./data/postgres:/var/lib/postgresql/data
  258. - ./data/memcached:/var/lib/memcached
  259. - ./data/redis:/data
  260. - ./data/neo4j:/var/lib/neo4j/data
  261. - ./data/mongo:/data/db
  262. - ./data/aerospike:/opt/aerospike/data
  263. - ./data/sessions:/sessions
  264. - ./data/elasticsearch/data:/usr/share/elasticsearch/data
  265. ### Add more Containers below ###############################