docker-compose.yaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  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. - docker.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. frames:
  174. hostname: frames
  175. container_name: frames
  176. build:
  177. context: .
  178. dockerfile: docker/admin/Dockerfile
  179. volumes:
  180. - ./apps/frames:/home/workspace:rw,cached
  181. tty: true
  182. ports:
  183. - 3004:3004
  184. - 3005:3005
  185. environment:
  186. - VIRTUAL_HOST=${FRAMES_VIRTUAL_HOST}
  187. - VIRTUAL_PORT=${FRAMES_PORT}
  188. - NODE_ENV=docker
  189. - HTTPS_METHOD=noredirect
  190. depends_on:
  191. - nginx_new
  192. portail:
  193. hostname: portail
  194. container_name: portail
  195. build:
  196. context: .
  197. dockerfile: docker/portail/Dockerfile
  198. args:
  199. - COMPOSER_HASH=${COMPOSER_HASH}
  200. restart: always
  201. volumes:
  202. - ./docker/portail/conf/LocalConfiguration.php:/var/www/html/typo3conf/LocalConfiguration.php:cached
  203. - ./apps/portail/websites:/var/www/html/websites:cached
  204. - ./apps/opentalent/templates:/var/www/html/fileadmin/templates:cached
  205. - ./apps/portail/themes/BlueSky:/var/www/html/fileadmin/theme_gallery/BlueSky:cached
  206. - ./apps/portail/typo3extension/ot_cms:/var/www/html/typo3conf/ext/ot_cms:cached
  207. - ./apps/portail/typo3extension/ot_portail:/var/www/html/typo3conf/ext/ot_portail:cached
  208. - ./apps/portail/typo3extension/ot_webservice:/var/www/html/typo3conf/ext/ot_webservice:cached
  209. - ./apps/portail/typo3extension/theme_gallery:/var/www/html/typo3conf/ext/theme_gallery:cached
  210. - ./apps/portail/typo3extension/piwik:/var/www/html/typo3conf/ext/piwik:cached
  211. - ./apps/portail/typo3extension/piwikintegration:/var/www/html/typo3conf/ext/piwikintegration:cached
  212. environment:
  213. - VIRTUAL_HOST=${PORTAIL_VIRTUAL_HOST}
  214. - HTTPS_METHOD=noredirect
  215. depends_on:
  216. - nginx
  217. typo3:
  218. hostname: typo3
  219. container_name: typo3
  220. build:
  221. context: .
  222. dockerfile: docker/typo3/Dockerfile
  223. args:
  224. - COMPOSER_HASH=${COMPOSER_HASH}
  225. restart: always
  226. networks:
  227. default:
  228. aliases:
  229. - docker.sub.opentalent.fr
  230. - docker.sub.customdomain.fr
  231. volumes:
  232. - ./apps/ot_typo3/ot_admin:/var/opentalent/git/ot_typo3/ot_admin:cached
  233. - ./apps/ot_typo3/ot_connect:/var/opentalent/git/ot_typo3/ot_connect:cached
  234. - ./apps/ot_typo3/ot_core:/var/opentalent/git/ot_typo3/ot_core:cached
  235. - ./apps/ot_typo3/ot_optimizer:/var/opentalent/git/ot_typo3/ot_optimizer:cached
  236. - ./apps/ot_typo3/ot_stats:/var/opentalent/git/ot_typo3/ot_stats:cached
  237. - ./apps/ot_typo3/ot_templating:/var/opentalent/git/ot_typo3/ot_templating:cached
  238. - ./apps/ot_typo3/docker/typo3:/var/www/typo3:cached
  239. environment:
  240. - VIRTUAL_HOST=${TYPO3_VIRTUAL_HOST}
  241. - HTTPS_METHOD=noredirect
  242. - PHP_IDE_CONFIG=servername=typo3
  243. depends_on:
  244. - nginx
  245. adminassos:
  246. hostname: v59
  247. container_name: adminassos
  248. build:
  249. context: .
  250. dockerfile: docker/adminassos/Dockerfile
  251. args:
  252. - OS=${OS}
  253. restart: always
  254. volumes:
  255. - ./apps/opentalent:/var/source/opentalent:cached
  256. - ./useruploaddata:/var/www/opentalent/fileadmin/user_upload:cached
  257. - ./apps/vendor:/var/source/vendor:delegated
  258. - ./apps/opentalent-config:/var/source/config:cached
  259. environment:
  260. - VIRTUAL_HOST=${V59_VIRTUAL_HOST}
  261. depends_on:
  262. - nginx
  263. # metabase:
  264. # hostname: metabase
  265. # image: metabase/metabase
  266. # restart: always
  267. # volumes:
  268. # - ./metabase-data:/metabase-data
  269. # environment:
  270. ## - MB_DB_FILE=./metabase-data/metabase.db
  271. # - VIRTUAL_HOST=${METABASE_VIRTUAL_HOST}
  272. # - VIRTUAL_PORT=${METABASE_PORT}
  273. # depends_on:
  274. # - db
  275. es:
  276. hostname: es
  277. container_name: es
  278. image: elasticsearch:2.4.6-alpine
  279. restart: always
  280. volumes:
  281. - ./elasticsearchdata:/usr/share/elasticsearch/data
  282. - ./docker/elasticsearch/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:cached
  283. environment:
  284. - cluster.name=docker-cluster
  285. - bootstrap.memory_lock=true
  286. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  287. - VIRTUAL_HOST=${ES_VIRTUAL_HOST}
  288. - VIRTUAL_PORT=${ES_PORT}
  289. ulimits:
  290. memlock:
  291. soft: -1
  292. hard: -1
  293. thumbor:
  294. hostname: thumbor
  295. container_name: thumbor
  296. image: minimalcompact/thumbor
  297. restart: always
  298. environment:
  299. - VIRTUAL_HOST=${THUMBOR_VIRTUAL_HOST}
  300. - LOADER=thumbor.loaders.file_loader
  301. # volumes:
  302. # - ./apps/opentalent-platform/web/files:/data/loader:cached
  303. phpmyadmin:
  304. hostname: phpmyadmin
  305. container_name: phpmyadmin
  306. image: phpmyadmin/phpmyadmin
  307. environment:
  308. - VIRTUAL_HOST=${PHPMYADMIN_VIRTUAL_HOST}
  309. restart: always
  310. depends_on:
  311. - db
  312. memcached:
  313. hostname: memcached
  314. container_name: memcached
  315. image: memcached
  316. restart: always
  317. mailcatcher:
  318. hostname: mailcatcher
  319. container_name: mailcatcher
  320. image: sj26/mailcatcher
  321. restart: always
  322. ports:
  323. - '1025:1025'
  324. environment:
  325. - VIRTUAL_HOST=${MAILCATCHER_VIRTUAL_HOST}
  326. - VIRTUAL_PORT=${MAILCATCHER_PORT}
  327. - HTTPS_METHOD=noredirect
  328. depends_on:
  329. - nginx-proxy
  330. blackfire:
  331. hostname: blackfire
  332. container_name: blackfire
  333. image: blackfire/blackfire
  334. environment:
  335. - BLACKFIRE_LOG_LEVEL=4
  336. - BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID}
  337. - BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN}
  338. - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
  339. - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
  340. - VIRTUAL_HOST=${BLACK_FIRE_VIRTUAL_HOST}
  341. - VIRTUAL_PORT=${BLACK_FIRE_PORT}
  342. depends_on:
  343. - php70
  344. - php74
  345. phpdoc:
  346. hostname: phpdoc
  347. container_name: phpdoc
  348. image: nginx:alpine
  349. volumes:
  350. - ./apps/api-doc:/usr/share/nginx/html
  351. environment:
  352. - VIRTUAL_HOST=${PHPDOC_VIRTUAL_HOST}
  353. #docker run --rm -v /opt/opentalent/apps/api/src/:/data -v /opt/opentalent/apps/api-doc:/output phpdoc/phpdoc -d /data -t /output
  354. jsdoc:
  355. hostname: jsdoc
  356. container_name: jsdoc
  357. image: nginx:alpine
  358. volumes:
  359. - ./apps/admin-doc:/usr/share/nginx/html
  360. environment:
  361. - VIRTUAL_HOST=${JSDOC_VIRTUAL_HOST}
  362. volumes:
  363. mysqldata: ~
  364. elasticsearchdata: ~
  365. # metabase-data: ~
  366. # On rajoute un volume (de données non accessibles en dehors)
  367. appdata: ~
  368. appVendor: ~
  369. appdata5: ~
  370. appVendor5: ~
  371. adminBower: ~
  372. adminNode: ~