docker-compose.yml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  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. networks:
  14. - network
  15. volumes:
  16. - /var/run/docker.sock:/tmp/docker.sock:ro
  17. - /etc/nginx/vhost.d
  18. - /usr/share/nginx/html
  19. db:
  20. hostname: db
  21. container_name: mariaDb
  22. build:
  23. context: .
  24. dockerfile: docker/mariaDb/Dockerfile
  25. args:
  26. - COMPOSER_HASH=${COMPOSER_HASH}
  27. restart: always
  28. ports:
  29. - "3306:3306"
  30. volumes:
  31. - ./apps/opentalent-platform/migration:/usr/src:cached
  32. - mysqldata:/var/lib/mysql
  33. - ./apps/env:/env:cached
  34. - ./apps/metabase:/usr/metabase:cached
  35. environment:
  36. MYSQL_ROOT_PASSWORD: ${MYSQL_PASS}
  37. networks:
  38. network:
  39. ipv4_address: 172.20.1.3
  40. nginx:
  41. hostname: nginx
  42. container_name: nginx
  43. image: nginx:alpine
  44. volumes:
  45. - ./apps/opentalent-platform/web:/var/www/html/web:cached
  46. - ./docker/nginx/site_php70.conf:/etc/nginx/conf.d/default.conf:cached
  47. environment:
  48. - VIRTUAL_HOST=${API_VIRTUAL_HOST}
  49. networks:
  50. network:
  51. aliases:
  52. - docker.nginx.opentalent.fr
  53. depends_on:
  54. - php70
  55. php70:
  56. hostname: api
  57. container_name: php70
  58. build:
  59. context: .
  60. dockerfile: docker/php/Dockerfile
  61. args:
  62. - COMPOSER_HASH=${COMPOSER_HASH}
  63. - OS=${OS}
  64. restart: always
  65. environment:
  66. - PHP_IDE_CONFIG=serverName=api
  67. - HTTPS_METHOD=noredirect
  68. volumes:
  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:rw,cached
  71. - appcache:/var/www/html/var/cache
  72. - applog:/var/www/html/var/logs
  73. networks:
  74. network:
  75. ipv4_address: 172.20.1.1
  76. depends_on:
  77. - db
  78. - es
  79. - thumbor
  80. - nginx-proxy
  81. nginx_new:
  82. hostname: nginx_new
  83. container_name: nginx_new
  84. image: nginx:alpine
  85. volumes:
  86. - ./apps/ap2i/public:/var/www/html/public:cached
  87. - ./docker/nginx/site_ap2i.conf:/etc/nginx/conf.d/default.conf:cached
  88. environment:
  89. - VIRTUAL_HOST=${AP2I_VIRTUAL_HOST}
  90. networks:
  91. - network
  92. depends_on:
  93. - ap2i
  94. nginx_maestro:
  95. hostname: nginx_maestro
  96. container_name: nginx_maestro
  97. image: nginx:alpine
  98. volumes:
  99. - ./apps/maestro/public:/var/www/html/public:cached
  100. - ./docker/nginx/site_maestro.conf:/etc/nginx/conf.d/default.conf:cached
  101. environment:
  102. - VIRTUAL_HOST=${MAESTRO_VIRTUAL_HOST}
  103. networks:
  104. - network
  105. depends_on:
  106. - maestro
  107. maestro:
  108. hostname: maestro
  109. container_name: maestro
  110. build:
  111. context: .
  112. dockerfile: docker/maestro/Dockerfile
  113. args:
  114. - COMPOSER_HASH=${COMPOSER_HASH}
  115. - OS=${OS}
  116. - HOST=${HOST}
  117. restart: always
  118. environment:
  119. - PHP_IDE_CONFIG=serverName=maestro
  120. - HTTPS_METHOD=noredirect
  121. - APP_ENV=dev
  122. - APP_DEBUG=1
  123. volumes:
  124. - ./apps/maestro:/var/www/html:rw,cached
  125. - appcache:/var/www/html/var/cache
  126. - applog:/var/www/html/var/logs
  127. networks:
  128. network:
  129. ipv4_address: 172.20.1.8
  130. depends_on:
  131. - nginx-proxy
  132. ap2i:
  133. hostname: ap2i
  134. container_name: ap2i
  135. build:
  136. context: .
  137. dockerfile: docker/ap2i/Dockerfile
  138. args:
  139. - COMPOSER_HASH=${COMPOSER_HASH}
  140. - OS=${OS}
  141. - HOST=${HOST}
  142. restart: always
  143. environment:
  144. - PHP_IDE_CONFIG=serverName=ap2i
  145. - HTTPS_METHOD=noredirect
  146. - APP_ENV=docker
  147. - APP_DEBUG=1
  148. volumes:
  149. # Le code sera surtout modifié en dehors du container, donc la consistence est prioritairement dans ce sens
  150. - ./apps/ap2i:/var/www/html:rw,cached
  151. - appcache5:/var/www/html/var/cache
  152. - applog5:/var/www/html/var/logs
  153. networks:
  154. network:
  155. ipv4_address: 172.20.2.1
  156. depends_on:
  157. - db
  158. - es
  159. - thumbor
  160. - nginx-proxy
  161. mercure:
  162. hostname: mercure
  163. container_name: mercure
  164. build:
  165. context: .
  166. dockerfile: docker/mercure/Dockerfile
  167. restart: unless-stopped
  168. environment:
  169. VIRTUAL_HOST: ${MERCURE_VIRTUAL_HOST}
  170. SERVER_NAME: ${MERCURE_VIRTUAL_HOST}
  171. MERCURE_PUBLISHER_JWT_KEY: ${MERCURE_PUBLISHER_JWT_KEY}
  172. MERCURE_SUBSCRIBER_JWT_KEY: ${MERCURE_SUBSCRIBER_JWT_KEY}
  173. volumes:
  174. - mercure_data:/data
  175. - mercure_config:/config
  176. - ./docker/mercure/caddy:/etc/caddy:cached
  177. networks:
  178. network:
  179. ipv4_address: 172.20.4.0
  180. python39:
  181. hostname: python39
  182. container_name: python39
  183. build:
  184. context: .
  185. dockerfile: docker/python39/Dockerfile
  186. args:
  187. - OS=${OS}
  188. restart: always
  189. volumes:
  190. - ./apps/python-scripts:/root/scripts:cached
  191. networks:
  192. network:
  193. ipv4_address: 172.20.4.1
  194. depends_on:
  195. - db
  196. - nginx-proxy
  197. admin:
  198. hostname: admin
  199. container_name: admin
  200. build:
  201. context: .
  202. dockerfile: docker/node/Dockerfile
  203. volumes:
  204. - ./apps/opentalent-admin-2.0:/home/workspace:rw,cached
  205. tty: true
  206. ports:
  207. - "3000:3000"
  208. - "3001:3001"
  209. environment:
  210. - VIRTUAL_HOST=${ADMIN_VIRTUAL_HOST}
  211. - VIRTUAL_PORT=${ADMIN_PORT}
  212. - NODE_ENV=docker
  213. - HTTPS_METHOD=noredirect
  214. networks:
  215. network:
  216. ipv4_address: 172.20.1.2
  217. depends_on:
  218. - nginx
  219. app:
  220. hostname: app
  221. container_name: app
  222. build:
  223. context: .
  224. dockerfile: docker/app/Dockerfile
  225. volumes:
  226. - ./apps/app:/home/workspace:rw,cached
  227. - ./apps/app-doc:/home/app-doc:rw,cached
  228. tty: true
  229. ports:
  230. - "3002:3002"
  231. - "3003:3003"
  232. environment:
  233. - VIRTUAL_HOST=${APP_VIRTUAL_HOST}
  234. - VIRTUAL_PORT=${APP_PORT}
  235. - NODE_ENV=docker
  236. - HTTPS_METHOD=noredirect
  237. - NODE_OPTIONS=--openssl-legacy-provider
  238. networks:
  239. network:
  240. ipv4_address: 172.20.2.2
  241. depends_on:
  242. - nginx_new
  243. app_v3:
  244. hostname: app_v3
  245. container_name: app_v3
  246. build:
  247. context: .
  248. dockerfile: docker/app/Dockerfile
  249. volumes:
  250. - ./apps/app-v3:/home/workspace:rw,cached
  251. tty: true
  252. ports:
  253. - "3009:3000"
  254. - "24678:24678"
  255. environment:
  256. - VIRTUAL_HOST=${APP_V3_VIRTUAL_HOST}
  257. - VIRTUAL_PORT=${APP_V3_PORT}
  258. - NODE_ENV=development
  259. - HTTPS_METHOD=noredirect
  260. networks:
  261. network:
  262. ipv4_address: 172.20.2.3
  263. depends_on:
  264. - nginx_new
  265. frames:
  266. hostname: frames
  267. container_name: frames
  268. build:
  269. context: .
  270. dockerfile: docker/frames/Dockerfile
  271. volumes:
  272. - ./apps/frames:/home/workspace:rw,cached
  273. tty: true
  274. ports:
  275. - "3004:3004"
  276. - "3005:3005"
  277. environment:
  278. - VIRTUAL_HOST=${FRAMES_VIRTUAL_HOST}
  279. - VIRTUAL_PORT=${FRAMES_PORT}
  280. - NODE_ENV=docker
  281. - HTTPS_METHOD=noredirect
  282. networks:
  283. network:
  284. ipv4_address: 172.20.2.4
  285. depends_on:
  286. - nginx_new
  287. agenda:
  288. hostname: agenda
  289. container_name: agenda
  290. build:
  291. context: .
  292. dockerfile: docker/agenda/Dockerfile
  293. volumes:
  294. - ./apps/agenda:/home/workspace:rw,cached
  295. - ./apps/nuxt_common:/home/workspace/nuxt_common:rw,cached
  296. tty: true
  297. ports:
  298. - "3007:3000"
  299. - "24679:24679"
  300. environment:
  301. - VIRTUAL_HOST=${AGENDA_VIRTUAL_HOST}
  302. - VIRTUAL_PORT=${AGENDA_PORT}
  303. - NODE_ENV=development
  304. - HTTPS_METHOD=noredirect
  305. networks:
  306. network:
  307. ipv4_address: 172.20.2.5
  308. depends_on:
  309. - nginx_new
  310. nuxt_common:
  311. hostname: nuxt_common
  312. container_name: nuxt_common
  313. build:
  314. context: .
  315. dockerfile: docker/nuxt_common/Dockerfile
  316. volumes:
  317. - ./apps/nuxt_common:/home/workspace:rw,cached
  318. tty: true
  319. ports:
  320. - "3006:3000"
  321. - "24669:24669"
  322. environment:
  323. - VIRTUAL_HOST=${NUXT_COMMON_VIRTUAL_HOST}
  324. - VIRTUAL_PORT=${NUXT_COMMON_PORT}
  325. - NODE_ENV=development
  326. - HTTPS_METHOD=noredirect
  327. networks:
  328. network:
  329. ipv4_address: 172.20.2.9
  330. depends_on:
  331. - nginx_new
  332. portail:
  333. hostname: portail
  334. container_name: portail
  335. build:
  336. context: .
  337. dockerfile: docker/portail/Dockerfile
  338. args:
  339. - COMPOSER_HASH=${COMPOSER_HASH}
  340. restart: always
  341. volumes:
  342. - ./docker/portail/conf/LocalConfiguration.php:/var/www/html/typo3conf/LocalConfiguration.php:cached
  343. - ./apps/portail/websites:/var/www/html/websites:cached
  344. - ./apps/opentalent/templates:/var/www/html/fileadmin/templates:cached
  345. - ./apps/portail/themes/BlueSky:/var/www/html/fileadmin/theme_gallery/BlueSky:cached
  346. - ./apps/portail/typo3extension/ot_cms:/var/www/html/typo3conf/ext/ot_cms:cached
  347. - ./apps/portail/typo3extension/ot_migration_typo8:/var/www/html/typo3conf/ext/ot_migration_typo8:cached
  348. - ./apps/portail/typo3extension/ot_portail:/var/www/html/typo3conf/ext/ot_portail:cached
  349. - ./apps/portail/typo3extension/ot_webservice:/var/www/html/typo3conf/ext/ot_webservice:cached
  350. - ./apps/portail/typo3extension/typo3_api:/var/www/html/typo3conf/ext/typo3_api:cached
  351. - ./apps/portail/typo3extension/theme_gallery:/var/www/html/typo3conf/ext/theme_gallery:cached
  352. - ./apps/portail/typo3extension/piwik:/var/www/html/typo3conf/ext/piwik:cached
  353. - ./apps/portail/typo3extension/piwikintegration:/var/www/html/typo3conf/ext/piwikintegration:cached
  354. environment:
  355. - VIRTUAL_HOST=${PORTAIL_VIRTUAL_HOST}
  356. - HTTPS_METHOD=noredirect
  357. networks:
  358. - network
  359. depends_on:
  360. - nginx
  361. portail_v2:
  362. hostname: portail_v2
  363. container_name: portail_v2
  364. build:
  365. context: .
  366. dockerfile: docker/portail_v2/Dockerfile
  367. volumes:
  368. - ./apps/portail_v2:/home/workspace:rw,cached
  369. tty: true
  370. ports:
  371. - "3010:3000"
  372. - "24680:24680"
  373. environment:
  374. - VIRTUAL_HOST=${PORTAIL_V2_VIRTUAL_HOST}
  375. - VIRTUAL_PORT=${PORTAIL_V2_PORT}
  376. - NODE_ENV=development
  377. - HTTPS_METHOD=noredirect
  378. networks:
  379. network:
  380. ipv4_address: 172.20.2.6
  381. depends_on:
  382. - nginx_new
  383. typo3:
  384. hostname: typo3
  385. container_name: typo3
  386. build:
  387. context: .
  388. dockerfile: docker/typo3/Dockerfile
  389. args:
  390. - COMPOSER_HASH=${COMPOSER_HASH}
  391. restart: always
  392. networks:
  393. network:
  394. ipv4_address: 172.20.3.1
  395. aliases:
  396. - docker.sub.opentalent.fr
  397. - docker.sub.customdomain.fr
  398. volumes:
  399. - ./apps/ot_typo3/ot_admin:/var/opentalent/git/ot_typo3/ot_admin:cached
  400. - ./apps/ot_typo3/ot_connect:/var/opentalent/git/ot_typo3/ot_connect:cached
  401. - ./apps/ot_typo3/ot_core:/var/opentalent/git/ot_typo3/ot_core:cached
  402. - ./apps/ot_typo3/ot_optimizer:/var/opentalent/git/ot_typo3/ot_optimizer:cached
  403. - ./apps/ot_typo3/ot_stats:/var/opentalent/git/ot_typo3/ot_stats:cached
  404. - ./apps/ot_typo3/ot_templating:/var/opentalent/git/ot_typo3/ot_templating:cached
  405. - ./apps/ot_typo3/docker/typo3:/var/www/typo3:cached
  406. environment:
  407. - VIRTUAL_HOST=${TYPO3_VIRTUAL_HOST}
  408. - HTTPS_METHOD=noredirect
  409. - PHP_IDE_CONFIG=servername=typo3
  410. depends_on:
  411. - nginx
  412. # adminassos:
  413. # hostname: v59
  414. # container_name: adminassos
  415. # build:
  416. # context: .
  417. # dockerfile: docker/adminassos/Dockerfile
  418. # args:
  419. # - OS=${OS}
  420. # restart: always
  421. # volumes:
  422. # - ./apps/opentalent:/var/source/opentalent:cached
  423. # - useruploaddata:/var/www/opentalent/fileadmin/user_upload:cached
  424. # - ./apps/vendor:/var/source/vendor:delegated
  425. # - ./apps/opentalent-config:/var/source/config:cached
  426. # environment:
  427. # - VIRTUAL_HOST=${V59_VIRTUAL_HOST}
  428. # networks:
  429. # - network
  430. # depends_on:
  431. # - nginx
  432. metabase:
  433. hostname: metabase
  434. image: metabase/metabase
  435. restart: always
  436. volumes:
  437. - ./metabase-data:/metabase-data
  438. environment:
  439. # - MB_DB_FILE=./metabase-data/metabase.db
  440. - VIRTUAL_HOST=${METABASE_VIRTUAL_HOST}
  441. - VIRTUAL_PORT=${METABASE_PORT}
  442. networks:
  443. - network
  444. depends_on:
  445. - db
  446. es:
  447. hostname: es
  448. container_name: es
  449. image: elasticsearch:2.4.6-alpine
  450. restart: always
  451. volumes:
  452. - elasticsearchdata:/usr/share/elasticsearch/data
  453. - ./docker/elasticsearch/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:cached
  454. environment:
  455. - cluster.name=docker-cluster
  456. - bootstrap.memory_lock=true
  457. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  458. - VIRTUAL_HOST=${ES_VIRTUAL_HOST}
  459. - VIRTUAL_PORT=${ES_PORT}
  460. ulimits:
  461. memlock:
  462. soft: -1
  463. hard: -1
  464. networks:
  465. - network
  466. thumbor:
  467. hostname: thumbor
  468. container_name: thumbor
  469. image: minimalcompact/thumbor
  470. restart: always
  471. environment:
  472. - VIRTUAL_HOST=${THUMBOR_VIRTUAL_HOST}
  473. - LOADER=thumbor.loaders.file_loader
  474. networks:
  475. - network
  476. # volumes:
  477. # - ./apps/opentalent-platform/web/files:/data/loader:cached
  478. phpmyadmin:
  479. hostname: phpmyadmin
  480. container_name: phpmyadmin
  481. image: phpmyadmin/phpmyadmin
  482. environment:
  483. - VIRTUAL_HOST=${PHPMYADMIN_VIRTUAL_HOST}
  484. restart: always
  485. networks:
  486. - network
  487. depends_on:
  488. - db
  489. memcached:
  490. hostname: memcached
  491. container_name: memcached
  492. image: memcached
  493. restart: always
  494. mailcatcher:
  495. hostname: mailcatcher
  496. container_name: mailcatcher
  497. image: sj26/mailcatcher
  498. restart: always
  499. ports:
  500. - "1025:1025"
  501. environment:
  502. - VIRTUAL_HOST=${MAILCATCHER_VIRTUAL_HOST}
  503. - VIRTUAL_PORT=${MAILCATCHER_PORT}
  504. - HTTPS_METHOD=noredirect
  505. networks:
  506. - network
  507. depends_on:
  508. - nginx-proxy
  509. blackfire:
  510. hostname: blackfire
  511. container_name: blackfire
  512. image: blackfire/blackfire
  513. environment:
  514. - BLACKFIRE_LOG_LEVEL=4
  515. - BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID}
  516. - BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN}
  517. - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
  518. - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
  519. - VIRTUAL_HOST=${BLACK_FIRE_VIRTUAL_HOST}
  520. - VIRTUAL_PORT=${BLACK_FIRE_PORT}
  521. networks:
  522. - network
  523. depends_on:
  524. - php70
  525. - ap2i
  526. phpdoc:
  527. hostname: phpdoc
  528. container_name: phpdoc
  529. image: nginx:alpine
  530. volumes:
  531. - ./apps/api-doc:/usr/share/nginx/html
  532. networks:
  533. - network
  534. environment:
  535. - VIRTUAL_HOST=${PHPDOC_VIRTUAL_HOST}
  536. #docker run --rm -v /opt/opentalent/apps/api/src/:/data -v /opt/opentalent/apps/api-doc:/output phpdoc/phpdoc -d /data -t /output
  537. jsdoc:
  538. hostname: jsdoc
  539. container_name: jsdoc
  540. image: nginx:alpine
  541. volumes:
  542. - ./apps/admin-doc:/usr/share/nginx/html
  543. environment:
  544. - VIRTUAL_HOST=${JSDOC_VIRTUAL_HOST}
  545. networks:
  546. - network
  547. networks:
  548. network:
  549. ipam:
  550. config:
  551. - subnet: 172.20.0.0/16
  552. volumes:
  553. mysqldata: ~
  554. elasticsearchdata: ~
  555. useruploaddata: ~
  556. appcache5: ~
  557. applog5: ~
  558. appcache: ~
  559. applog: ~
  560. mercure_data: ~
  561. mercure_config: ~