docker-compose.yaml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. version: '3.3'
  2. services:
  3. nginx-proxy:
  4. container_name: nginx-proxy
  5. build:
  6. context: .
  7. dockerfile: docker/nginx/Dockerfile
  8. restart: always
  9. ports:
  10. - 80:80
  11. - 443:443
  12. volumes:
  13. - /var/run/docker.sock:/tmp/docker.sock:ro
  14. - /etc/nginx/vhost.d
  15. - /usr/share/nginx/html
  16. db:
  17. container_name: mariaDb
  18. build:
  19. context: .
  20. dockerfile: docker/mariaDb/Dockerfile
  21. restart: always
  22. ports:
  23. - 3306:3306
  24. volumes:
  25. - ./mysqldata:/var/lib/mysql
  26. - ./apps/env:/env:cached
  27. - ./apps/metabase:/usr/metabase:cached
  28. environment:
  29. MYSQL_ROOT_PASSWORD: ${MYSQL_PASS}
  30. phpmyadmin:
  31. container_name: phpmyadmin
  32. image: phpmyadmin/phpmyadmin
  33. environment:
  34. - VIRTUAL_HOST=${PHPMYADMIN_VIRTUAL_HOST}
  35. restart: always
  36. depends_on:
  37. - db
  38. es:
  39. container_name: es
  40. image: elasticsearch:2.4.6-alpine
  41. restart: always
  42. volumes:
  43. - ./elasticsearchdata:/usr/share/elasticsearch/data
  44. - ./docker/elasticsearch/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:cached
  45. environment:
  46. - cluster.name=docker-cluster
  47. - bootstrap.memory_lock=true
  48. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  49. - VIRTUAL_HOST=${ES_VIRTUAL_HOST}
  50. - VIRTUAL_PORT=${ES_PORT}
  51. ulimits:
  52. memlock:
  53. soft: -1
  54. hard: -1
  55. thumbor:
  56. container_name: thumbor
  57. image: minimalcompact/thumbor
  58. restart: always
  59. environment:
  60. - VIRTUAL_HOST=${THUMBOR_VIRTUAL_HOST}
  61. - LOADER=thumbor.loaders.file_loader
  62. # volumes:
  63. # - ./apps/opentalent-platform/web/files:/data/loader:cached
  64. php:
  65. container_name: php
  66. build:
  67. context: .
  68. dockerfile: docker/php/Dockerfile
  69. args:
  70. - COMPOSER_HASH=${COMPOSER_HASH}
  71. - OS=${OS}
  72. restart: always
  73. volumes:
  74. # Version Symfony 2
  75. - appdata:/var/www/html/app/cache/
  76. - appdata:/var/www/html/app/logs/
  77. # Le code sera surtout modifié en dehors du container, donc la consistence est prioritairement dans ce sens
  78. - ./apps/opentalent-platform:/var/www/html:rw,cached
  79. # A l'inverse, les vendors seront surtout modifiés dans le container
  80. - ./apps/opentalent-platform/vendor:/var/www/html/vendor:delegated
  81. depends_on:
  82. - db
  83. - es
  84. - thumbor
  85. - nginx-proxy
  86. api:
  87. container_name: api
  88. image: nginx:alpine
  89. volumes:
  90. - ./apps/opentalent-platform/web:/var/www/html/web:rw,cached
  91. - ./docker/nginx/site.conf:/etc/nginx/conf.d/default.conf:cached
  92. environment:
  93. - VIRTUAL_HOST=${API_VIRTUAL_HOST}
  94. - HTTPS_METHOD=noredirect
  95. depends_on:
  96. - php
  97. admin:
  98. container_name: admin
  99. build:
  100. context: .
  101. dockerfile: docker/node/Dockerfile
  102. volumes:
  103. - admindata:/home/workspace/dist
  104. - admindata:/home/workspace/.tmp
  105. - ./apps/opentalent-admin-2.0:/home/workspace:rw,cached
  106. - ./apps/opentalent-admin-2.0/node_modules:/home/workspace/nodes_modules:rw,delegated
  107. - ./apps/opentalent-admin-2.0/bower_components:/home/workspace/bower_components:rw,delegated
  108. tty: true
  109. ports:
  110. - 3000:3000
  111. - 3001:3001
  112. environment:
  113. - VIRTUAL_HOST=${ADMIN_VIRTUAL_HOST}
  114. - VIRTUAL_PORT=${ADMIN_PORT}
  115. - NODE_ENV=docker
  116. - HTTPS_METHOD=noredirect
  117. depends_on:
  118. - api
  119. portail:
  120. container_name: portail
  121. build:
  122. context: .
  123. dockerfile: docker/typo3/Dockerfile
  124. args:
  125. - COMPOSER_HASH=${COMPOSER_HASH}
  126. restart: always
  127. volumes:
  128. - ./docker/typo3/conf/LocalConfiguration.php:/var/www/html/typo3conf/LocalConfiguration.php:rw,cached
  129. - ./apps/typo3/websites:/var/www/html/websites:rw,cached
  130. - ./apps/opentalent/templates:/var/www/html/fileadmin/templates:rw,cached
  131. - ./apps/typo3/themes/BlueSky:/var/www/html/fileadmin/theme_gallery/BlueSky:rw,cached
  132. - ./apps/typo3/typo3extension/ot_cms:/var/www/html/typo3conf/ext/ot_cms:rw,cached
  133. - ./apps/typo3/typo3extension/ot_portail:/var/www/html/typo3conf/ext/ot_portail:rw,cached
  134. - ./apps/typo3/typo3extension/ot_webservice:/var/www/html/typo3conf/ext/ot_webservice:rw,cached
  135. - ./apps/typo3/typo3extension/theme_gallery:/var/www/html/typo3conf/ext/theme_gallery:rw,cached
  136. - ./apps/typo3/typo3extension/piwik:/var/www/html/typo3conf/ext/piwik:rw,cached
  137. - ./apps/typo3/typo3extension/piwikintegration:/var/www/html/typo3conf/ext/piwikintegration:rw,cached
  138. environment:
  139. - VIRTUAL_HOST=${PORTAIL_VIRTUAL_HOST}
  140. - HTTPS_METHOD=noredirect
  141. depends_on:
  142. - api
  143. adminassos:
  144. container_name: adminassos
  145. build:
  146. context: .
  147. dockerfile: docker/adminassos/Dockerfile
  148. args:
  149. - OS=${OS}
  150. restart: always
  151. volumes:
  152. - ./apps/opentalent:/var/source/opentalent:rw,cached
  153. - ./apps/vendor:/var/source/vendor:rw,delegated
  154. - ./apps/opentalent-config:/var/source/config:rw,cached
  155. environment:
  156. - VIRTUAL_HOST=${V59_VIRTUAL_HOST}
  157. depends_on:
  158. - api
  159. mailcatcher:
  160. container_name: mailcatcher
  161. image: sj26/mailcatcher
  162. restart: always
  163. ports:
  164. - '1025:1025'
  165. environment:
  166. - VIRTUAL_HOST=${MAILCATCHER_VIRTUAL_HOST}
  167. - VIRTUAL_PORT=${MAILCATCHER_PORT}
  168. depends_on:
  169. - nginx-proxy
  170. blackfire:
  171. container_name: blackfire
  172. image: blackfire/blackfire
  173. environment:
  174. # Exposes the host BLACKFIRE_SERVER_ID and TOKEN environment variables.
  175. - ${BLACK_FIRE_ID}
  176. - ${BLACK_FIRE_TOKEN}
  177. - VIRTUAL_HOST=${BLACK_FIRE_VIRTUAL_HOST}
  178. - VIRTUAL_PORT=${BLACK_FIRE_PORT}
  179. depends_on:
  180. - php
  181. metabase:
  182. image: metabase/metabase
  183. restart: always
  184. environment:
  185. - VIRTUAL_HOST=${METABASE_VIRTUAL_HOST}
  186. - VIRTUAL_PORT=${METABASE_PORT}
  187. depends_on:
  188. - db
  189. volumes:
  190. mysqldata: ~
  191. elasticsearchdata: ~
  192. # On rajoute un volume (de données non accessibles en dehors)
  193. appdata: ~
  194. admindata: ~