docker-compose.yaml 6.2 KB

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