docker-compose.yaml 11 KB

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