docker-compose.yaml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. version: '3.3'
  2. services:
  3. nginx-proxy:
  4. hostname: nginx-proxy
  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. nginx:
  18. hostname: nginx
  19. container_name: nginx
  20. image: nginx:alpine
  21. volumes:
  22. - ./apps/api/public:/var/www/html/public:cached
  23. - ./apps/opentalent-platform/web:/var/www/html/web:cached
  24. - ./docker/nginx/site.conf:/etc/nginx/conf.d/default.conf:cached
  25. environment:
  26. - VIRTUAL_HOST=${API_VIRTUAL_HOST}
  27. - HTTPS_METHOD=noredirect
  28. depends_on:
  29. - php70
  30. - php74
  31. db:
  32. hostname: db
  33. container_name: mariaDb
  34. build:
  35. context: .
  36. dockerfile: docker/mariaDb/Dockerfile
  37. args:
  38. - COMPOSER_HASH=${COMPOSER_HASH}
  39. restart: always
  40. ports:
  41. - 3306:3306
  42. volumes:
  43. - ./apps/opentalent-platform/migration:/usr/src:cached
  44. - ./mysqldata:/var/lib/mysql
  45. - ./apps/env:/env:cached
  46. - ./apps/metabase:/usr/metabase:cached
  47. environment:
  48. MYSQL_ROOT_PASSWORD: ${MYSQL_PASS}
  49. php70:
  50. hostname: apiLegacy
  51. container_name: php70
  52. build:
  53. context: .
  54. dockerfile: docker/php/Dockerfile
  55. args:
  56. - COMPOSER_HASH=${COMPOSER_HASH}
  57. - OS=${OS}
  58. restart: always
  59. environment:
  60. - PHP_IDE_CONFIG=serverName=api
  61. volumes:
  62. # Version Symfony 2
  63. - appdata:/var/www/html/app/cache/
  64. - appdata:/var/www/html/app/logs/
  65. # ATTENTION : LES VENDROS SONT DELEGUES AU CONTAINER : AUCUNE MODIF FAITES SUR LA MACHINE HOST NE SERA REPLIQUE SUR
  66. # LE CONTAINER ET VICE ET VERSA, mettre en com la ligne pour modifier et décommenter ./apps/opentalent-platform/vendor:/var/www/html/vendor:delegated.
  67. - appVendor:/var/www/html/vendor/
  68. - ./useruploaddata:/var/www/html/fileadmin/user_upload:cached
  69. # Le code sera surtout modifié en dehors du container, donc la consistence est prioritairement dans ce sens
  70. - ./apps/opentalent-platform:/var/www/html:cached
  71. # A l'inverse, les vendors seront surtout modifiés dans le container
  72. # - ./apps/opentalent-platform/vendor:/var/www/html/vendor:delegated
  73. depends_on:
  74. - db
  75. - es
  76. - thumbor
  77. - nginx-proxy
  78. php74:
  79. hostname: api
  80. container_name: php74
  81. build:
  82. context: .
  83. dockerfile: docker/php7.4/Dockerfile
  84. args:
  85. - COMPOSER_HASH=${COMPOSER_HASH}
  86. - OS=${OS}
  87. restart: always
  88. environment:
  89. - PHP_IDE_CONFIG=serverName=api
  90. volumes:
  91. # Le code sera surtout modifié en dehors du container, donc la consistence est prioritairement dans ce sens
  92. - ./apps/api:/var/www/html:cached
  93. # Version Symfony 5
  94. - appdata5:/var/www/html/var/cache/
  95. - appdata5:/var/www/html/var/logs/
  96. # ATTENTION : LES VENDROS SONT DELEGUES AU CONTAINER : AUCUNE MODIF FAITES SUR LA MACHINE HOST NE SERA REPLIQUE SUR
  97. # LE CONTAINER ET VICE ET VERSA, mettre en com la ligne pour modifier et décommenter ./apps/api/New/vendor:/var/www/html/vendor:delegated.
  98. # - appVendor5:/var/www/html/vendor/
  99. # A l'inverse, les vendors seront surtout modifiés dans le container
  100. - ./apps/api/vendor:/var/www/html/vendor:delegated
  101. depends_on:
  102. - db
  103. - es
  104. - thumbor
  105. - nginx-proxy
  106. admin:
  107. hostname: front
  108. container_name: admin
  109. build:
  110. context: .
  111. dockerfile: docker/node/Dockerfile
  112. volumes:
  113. - ./apps/opentalent-admin-2.0:/home/workspace:rw,cached
  114. tty: true
  115. ports:
  116. - 3000:3000
  117. - 3001:3001
  118. environment:
  119. - VIRTUAL_HOST=${ADMIN_VIRTUAL_HOST}
  120. - VIRTUAL_PORT=${ADMIN_PORT}
  121. - NODE_ENV=docker
  122. - HTTPS_METHOD=noredirect
  123. depends_on:
  124. - nginx
  125. admin2:
  126. hostname: front2
  127. container_name: admin2
  128. build:
  129. context: .
  130. dockerfile: docker/admin/Dockerfile
  131. volumes:
  132. - ./apps/admin:/home/workspace/admin:rw,cached
  133. tty: true
  134. ports:
  135. - 3002:3002
  136. - 3003:3003
  137. environment:
  138. - VIRTUAL_HOST=${ADMIN2_VIRTUAL_HOST}
  139. - VIRTUAL_PORT=${ADMIN2_PORT}
  140. - NODE_ENV=docker
  141. - HTTPS_METHOD=noredirect
  142. depends_on:
  143. - nginx
  144. portail:
  145. hostname: portail
  146. container_name: portail
  147. build:
  148. context: .
  149. dockerfile: docker/portail/Dockerfile
  150. args:
  151. - COMPOSER_HASH=${COMPOSER_HASH}
  152. restart: always
  153. volumes:
  154. - ./docker/portail/conf/LocalConfiguration.php:/var/www/html/typo3conf/LocalConfiguration.php:cached
  155. - ./apps/portail/websites:/var/www/html/websites:cached
  156. - ./apps/opentalent/templates:/var/www/html/fileadmin/templates:cached
  157. - ./apps/portail/themes/BlueSky:/var/www/html/fileadmin/theme_gallery/BlueSky:cached
  158. - ./apps/portail/typo3extension/ot_cms:/var/www/html/typo3conf/ext/ot_cms:cached
  159. - ./apps/portail/typo3extension/ot_portail:/var/www/html/typo3conf/ext/ot_portail:cached
  160. - ./apps/portail/typo3extension/ot_webservice:/var/www/html/typo3conf/ext/ot_webservice:cached
  161. - ./apps/portail/typo3extension/theme_gallery:/var/www/html/typo3conf/ext/theme_gallery:cached
  162. - ./apps/portail/typo3extension/piwik:/var/www/html/typo3conf/ext/piwik:cached
  163. - ./apps/portail/typo3extension/piwikintegration:/var/www/html/typo3conf/ext/piwikintegration:cached
  164. environment:
  165. - VIRTUAL_HOST=${PORTAIL_VIRTUAL_HOST}
  166. - HTTPS_METHOD=noredirect
  167. depends_on:
  168. - nginx
  169. typo3:
  170. hostname: typo3
  171. container_name: typo3
  172. build:
  173. context: .
  174. dockerfile: docker/typo3/Dockerfile
  175. args:
  176. - COMPOSER_HASH=${COMPOSER_HASH}
  177. restart: always
  178. volumes:
  179. - ./apps/ot_typo3:/var/opentalent/git/ot_typo3:cached
  180. - ./apps/ot_typo3/docker/typo3:/var/www/typo3:delegated
  181. environment:
  182. - VIRTUAL_HOST=${TYPO3_VIRTUAL_HOST}
  183. - HTTPS_METHOD=noredirect
  184. - PHP_IDE_CONFIG=servername=typo3
  185. depends_on:
  186. - nginx
  187. adminassos:
  188. hostname: v59
  189. container_name: adminassos
  190. build:
  191. context: .
  192. dockerfile: docker/adminassos/Dockerfile
  193. args:
  194. - OS=${OS}
  195. restart: always
  196. volumes:
  197. - ./apps/opentalent:/var/source/opentalent:cached
  198. - ./useruploaddata:/var/www/opentalent/fileadmin/user_upload:cached
  199. - ./apps/vendor:/var/source/vendor:delegated
  200. - ./apps/opentalent-config:/var/source/config:cached
  201. environment:
  202. - VIRTUAL_HOST=${V59_VIRTUAL_HOST}
  203. depends_on:
  204. - nginx
  205. metabase:
  206. hostname: metabase
  207. image: metabase/metabase
  208. restart: always
  209. volumes:
  210. - ./metabase-data:/metabase-data
  211. environment:
  212. - MB_DB_FILE=./metabase-data/metabase.db
  213. - VIRTUAL_HOST=${METABASE_VIRTUAL_HOST}
  214. - VIRTUAL_PORT=${METABASE_PORT}
  215. depends_on:
  216. - db
  217. es:
  218. hostname: es
  219. container_name: es
  220. image: elasticsearch:2.4.6-alpine
  221. restart: always
  222. volumes:
  223. - ./elasticsearchdata:/usr/share/elasticsearch/data
  224. - ./docker/elasticsearch/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:cached
  225. environment:
  226. - cluster.name=docker-cluster
  227. - bootstrap.memory_lock=true
  228. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  229. - VIRTUAL_HOST=${ES_VIRTUAL_HOST}
  230. - VIRTUAL_PORT=${ES_PORT}
  231. ulimits:
  232. memlock:
  233. soft: -1
  234. hard: -1
  235. thumbor:
  236. hostname: thumbor
  237. container_name: thumbor
  238. image: minimalcompact/thumbor
  239. restart: always
  240. environment:
  241. - VIRTUAL_HOST=${THUMBOR_VIRTUAL_HOST}
  242. - LOADER=thumbor.loaders.file_loader
  243. # volumes:
  244. # - ./apps/opentalent-platform/web/files:/data/loader:cached
  245. phpmyadmin:
  246. hostname: phpmyadmin
  247. container_name: phpmyadmin
  248. image: phpmyadmin/phpmyadmin
  249. environment:
  250. - VIRTUAL_HOST=${PHPMYADMIN_VIRTUAL_HOST}
  251. restart: always
  252. depends_on:
  253. - db
  254. mailcatcher:
  255. hostname: mailcatcher
  256. container_name: mailcatcher
  257. image: sj26/mailcatcher
  258. restart: always
  259. ports:
  260. - '1025:1025'
  261. environment:
  262. - VIRTUAL_HOST=${MAILCATCHER_VIRTUAL_HOST}
  263. - VIRTUAL_PORT=${MAILCATCHER_PORT}
  264. - HTTPS_METHOD=noredirect
  265. depends_on:
  266. - nginx-proxy
  267. blackfire:
  268. hostname: blackfire
  269. container_name: blackfire
  270. image: blackfire/blackfire
  271. environment:
  272. - BLACKFIRE_LOG_LEVEL=4
  273. - BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID}
  274. - BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN}
  275. - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
  276. - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
  277. - VIRTUAL_HOST=${BLACK_FIRE_VIRTUAL_HOST}
  278. - VIRTUAL_PORT=${BLACK_FIRE_PORT}
  279. depends_on:
  280. - php70
  281. - php74
  282. volumes:
  283. mysqldata: ~
  284. elasticsearchdata: ~
  285. metabase-data: ~
  286. # On rajoute un volume (de données non accessibles en dehors)
  287. appdata: ~
  288. appVendor: ~
  289. appdata5: ~
  290. appVendor5: ~
  291. adminBower: ~
  292. adminNode: ~