docker-compose.yaml 9.8 KB

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