docker-compose.yaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  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 VENDORS 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. python39:
  117. hostname: python39
  118. container_name: python39
  119. build:
  120. context: .
  121. dockerfile: docker/python39/Dockerfile
  122. args:
  123. - OS=${OS}
  124. restart: always
  125. volumes:
  126. - ./apps/python-scripts:/root/scripts:cached
  127. depends_on:
  128. - db
  129. - nginx-proxy
  130. admin:
  131. hostname: frontLegacy
  132. container_name: adminLegacy
  133. build:
  134. context: .
  135. dockerfile: docker/node/Dockerfile
  136. volumes:
  137. - ./apps/opentalent-admin-2.0:/home/workspace:rw,cached
  138. tty: true
  139. ports:
  140. - 3000:3000
  141. - 3001:3001
  142. environment:
  143. - VIRTUAL_HOST=${ADMIN_VIRTUAL_HOST}
  144. - VIRTUAL_PORT=${ADMIN_PORT}
  145. - NODE_ENV=docker
  146. - HTTPS_METHOD=noredirect
  147. depends_on:
  148. - nginx
  149. admin2:
  150. hostname: front
  151. container_name: admin
  152. build:
  153. context: .
  154. dockerfile: docker/admin/Dockerfile
  155. volumes:
  156. - ./apps/admin:/home/workspace:rw,cached
  157. - ./apps/admin-doc:/home/admin-doc:rw,cached
  158. tty: true
  159. ports:
  160. - 3002:3002
  161. - 3003:3003
  162. environment:
  163. - VIRTUAL_HOST=${ADMIN2_VIRTUAL_HOST}
  164. - VIRTUAL_PORT=${ADMIN2_PORT}
  165. - NODE_ENV=docker
  166. - HTTPS_METHOD=noredirect
  167. depends_on:
  168. - nginx_new
  169. portail:
  170. hostname: portail
  171. container_name: portail
  172. build:
  173. context: .
  174. dockerfile: docker/portail/Dockerfile
  175. args:
  176. - COMPOSER_HASH=${COMPOSER_HASH}
  177. restart: always
  178. volumes:
  179. - ./docker/portail/conf/LocalConfiguration.php:/var/www/html/typo3conf/LocalConfiguration.php:cached
  180. - ./apps/portail/websites:/var/www/html/websites:cached
  181. - ./apps/opentalent/templates:/var/www/html/fileadmin/templates:cached
  182. - ./apps/portail/themes/BlueSky:/var/www/html/fileadmin/theme_gallery/BlueSky:cached
  183. - ./apps/portail/typo3extension/ot_cms:/var/www/html/typo3conf/ext/ot_cms:cached
  184. - ./apps/portail/typo3extension/ot_portail:/var/www/html/typo3conf/ext/ot_portail:cached
  185. - ./apps/portail/typo3extension/ot_webservice:/var/www/html/typo3conf/ext/ot_webservice:cached
  186. - ./apps/portail/typo3extension/theme_gallery:/var/www/html/typo3conf/ext/theme_gallery:cached
  187. - ./apps/portail/typo3extension/piwik:/var/www/html/typo3conf/ext/piwik:cached
  188. - ./apps/portail/typo3extension/piwikintegration:/var/www/html/typo3conf/ext/piwikintegration:cached
  189. environment:
  190. - VIRTUAL_HOST=${PORTAIL_VIRTUAL_HOST}
  191. - HTTPS_METHOD=noredirect
  192. depends_on:
  193. - nginx
  194. typo3:
  195. hostname: typo3
  196. container_name: typo3
  197. build:
  198. context: .
  199. dockerfile: docker/typo3/Dockerfile
  200. args:
  201. - COMPOSER_HASH=${COMPOSER_HASH}
  202. restart: always
  203. volumes:
  204. - ./apps/ot_typo3/ot_admin:/var/opentalent/git/ot_typo3/ot_admin:cached
  205. - ./apps/ot_typo3/ot_connect:/var/opentalent/git/ot_typo3/ot_connect:cached
  206. - ./apps/ot_typo3/ot_core:/var/opentalent/git/ot_typo3/ot_core:cached
  207. - ./apps/ot_typo3/ot_optimizer:/var/opentalent/git/ot_typo3/ot_optimizer:cached
  208. - ./apps/ot_typo3/ot_stats:/var/opentalent/git/ot_typo3/ot_stats:cached
  209. - ./apps/ot_typo3/ot_templating:/var/opentalent/git/ot_typo3/ot_templating:cached
  210. - ./apps/ot_typo3/docker/typo3:/var/www/typo3:cached
  211. environment:
  212. - VIRTUAL_HOST=${TYPO3_VIRTUAL_HOST}
  213. - HTTPS_METHOD=noredirect
  214. - PHP_IDE_CONFIG=servername=typo3
  215. depends_on:
  216. - nginx
  217. adminassos:
  218. hostname: v59
  219. container_name: adminassos
  220. build:
  221. context: .
  222. dockerfile: docker/adminassos/Dockerfile
  223. args:
  224. - OS=${OS}
  225. restart: always
  226. volumes:
  227. - ./apps/opentalent:/var/source/opentalent:cached
  228. - ./useruploaddata:/var/www/opentalent/fileadmin/user_upload:cached
  229. - ./apps/vendor:/var/source/vendor:delegated
  230. - ./apps/opentalent-config:/var/source/config:cached
  231. environment:
  232. - VIRTUAL_HOST=${V59_VIRTUAL_HOST}
  233. depends_on:
  234. - nginx
  235. # metabase:
  236. # hostname: metabase
  237. # image: metabase/metabase
  238. # restart: always
  239. # volumes:
  240. # - ./metabase-data:/metabase-data
  241. # environment:
  242. ## - MB_DB_FILE=./metabase-data/metabase.db
  243. # - VIRTUAL_HOST=${METABASE_VIRTUAL_HOST}
  244. # - VIRTUAL_PORT=${METABASE_PORT}
  245. # depends_on:
  246. # - db
  247. es:
  248. hostname: es
  249. container_name: es
  250. image: elasticsearch:2.4.6-alpine
  251. restart: always
  252. volumes:
  253. - ./elasticsearchdata:/usr/share/elasticsearch/data
  254. - ./docker/elasticsearch/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:cached
  255. environment:
  256. - cluster.name=docker-cluster
  257. - bootstrap.memory_lock=true
  258. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  259. - VIRTUAL_HOST=${ES_VIRTUAL_HOST}
  260. - VIRTUAL_PORT=${ES_PORT}
  261. ulimits:
  262. memlock:
  263. soft: -1
  264. hard: -1
  265. thumbor:
  266. hostname: thumbor
  267. container_name: thumbor
  268. image: minimalcompact/thumbor
  269. restart: always
  270. environment:
  271. - VIRTUAL_HOST=${THUMBOR_VIRTUAL_HOST}
  272. - LOADER=thumbor.loaders.file_loader
  273. # volumes:
  274. # - ./apps/opentalent-platform/web/files:/data/loader:cached
  275. phpmyadmin:
  276. hostname: phpmyadmin
  277. container_name: phpmyadmin
  278. image: phpmyadmin/phpmyadmin
  279. environment:
  280. - VIRTUAL_HOST=${PHPMYADMIN_VIRTUAL_HOST}
  281. restart: always
  282. depends_on:
  283. - db
  284. memcached:
  285. hostname: memcached
  286. container_name: memcached
  287. image: memcached
  288. restart: always
  289. mailcatcher:
  290. hostname: mailcatcher
  291. container_name: mailcatcher
  292. image: sj26/mailcatcher
  293. restart: always
  294. ports:
  295. - '1025:1025'
  296. environment:
  297. - VIRTUAL_HOST=${MAILCATCHER_VIRTUAL_HOST}
  298. - VIRTUAL_PORT=${MAILCATCHER_PORT}
  299. - HTTPS_METHOD=noredirect
  300. depends_on:
  301. - nginx-proxy
  302. blackfire:
  303. hostname: blackfire
  304. container_name: blackfire
  305. image: blackfire/blackfire
  306. environment:
  307. - BLACKFIRE_LOG_LEVEL=4
  308. - BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID}
  309. - BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN}
  310. - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
  311. - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
  312. - VIRTUAL_HOST=${BLACK_FIRE_VIRTUAL_HOST}
  313. - VIRTUAL_PORT=${BLACK_FIRE_PORT}
  314. depends_on:
  315. - php70
  316. - php74
  317. phpdoc:
  318. hostname: phpdoc
  319. container_name: phpdoc
  320. image: nginx:alpine
  321. volumes:
  322. - ./apps/api-doc:/usr/share/nginx/html
  323. environment:
  324. - VIRTUAL_HOST=${PHPDOC_VIRTUAL_HOST}
  325. #docker run --rm -v /opt/opentalent/apps/api/src/:/data -v /opt/opentalent/apps/api-doc:/output phpdoc/phpdoc -d /data -t /output
  326. jsdoc:
  327. hostname: jsdoc
  328. container_name: jsdoc
  329. image: nginx:alpine
  330. volumes:
  331. - ./apps/admin-doc:/usr/share/nginx/html
  332. environment:
  333. - VIRTUAL_HOST=${JSDOC_VIRTUAL_HOST}
  334. volumes:
  335. mysqldata: ~
  336. elasticsearchdata: ~
  337. # metabase-data: ~
  338. # On rajoute un volume (de données non accessibles en dehors)
  339. appdata: ~
  340. appVendor: ~
  341. appdata5: ~
  342. appVendor5: ~
  343. adminBower: ~
  344. adminNode: ~