docker-compose.yml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  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. frames_v3:
  288. hostname: frames_v3
  289. container_name: frames_v3
  290. build:
  291. context: .
  292. dockerfile: docker/frames_v3/Dockerfile
  293. volumes:
  294. - ./apps/frames_v3:/home/workspace:rw,cached
  295. tty: true
  296. ports:
  297. - "3007:3000"
  298. - "24679:24679"
  299. environment:
  300. - VIRTUAL_HOST=${FRAMES_V3_VIRTUAL_HOST}
  301. - VIRTUAL_PORT=${FRAMES_V3_PORT}
  302. - NODE_ENV=development
  303. - HTTPS_METHOD=noredirect
  304. networks:
  305. network:
  306. ipv4_address: 172.20.2.5
  307. depends_on:
  308. - nginx_new
  309. nuxt_common:
  310. hostname: nuxt_common
  311. container_name: nuxt_common
  312. build:
  313. context: .
  314. dockerfile: docker/nuxt_common/Dockerfile
  315. volumes:
  316. - ./apps/nuxt_common:/home/workspace:rw,cached
  317. tty: true
  318. ports:
  319. - "3006:3000"
  320. - "24669:24669"
  321. environment:
  322. - VIRTUAL_HOST=${NUXT_COMMON_VIRTUAL_HOST}
  323. - VIRTUAL_PORT=${NUXT_COMMON_PORT}
  324. - NODE_ENV=development
  325. - HTTPS_METHOD=noredirect
  326. networks:
  327. network:
  328. ipv4_address: 172.20.2.9
  329. depends_on:
  330. - nginx_new
  331. portail:
  332. hostname: portail
  333. container_name: portail
  334. build:
  335. context: .
  336. dockerfile: docker/portail/Dockerfile
  337. args:
  338. - COMPOSER_HASH=${COMPOSER_HASH}
  339. restart: always
  340. volumes:
  341. - ./docker/portail/conf/LocalConfiguration.php:/var/www/html/typo3conf/LocalConfiguration.php:cached
  342. - ./apps/portail/websites:/var/www/html/websites:cached
  343. - ./apps/opentalent/templates:/var/www/html/fileadmin/templates:cached
  344. - ./apps/portail/themes/BlueSky:/var/www/html/fileadmin/theme_gallery/BlueSky:cached
  345. - ./apps/portail/typo3extension/ot_cms:/var/www/html/typo3conf/ext/ot_cms:cached
  346. - ./apps/portail/typo3extension/ot_migration_typo8:/var/www/html/typo3conf/ext/ot_migration_typo8:cached
  347. - ./apps/portail/typo3extension/ot_portail:/var/www/html/typo3conf/ext/ot_portail:cached
  348. - ./apps/portail/typo3extension/ot_webservice:/var/www/html/typo3conf/ext/ot_webservice:cached
  349. - ./apps/portail/typo3extension/typo3_api:/var/www/html/typo3conf/ext/typo3_api:cached
  350. - ./apps/portail/typo3extension/theme_gallery:/var/www/html/typo3conf/ext/theme_gallery:cached
  351. - ./apps/portail/typo3extension/piwik:/var/www/html/typo3conf/ext/piwik:cached
  352. - ./apps/portail/typo3extension/piwikintegration:/var/www/html/typo3conf/ext/piwikintegration:cached
  353. environment:
  354. - VIRTUAL_HOST=${PORTAIL_VIRTUAL_HOST}
  355. - HTTPS_METHOD=noredirect
  356. networks:
  357. - network
  358. depends_on:
  359. - nginx
  360. portail_v2:
  361. hostname: portail_v2
  362. container_name: portail_v2
  363. build:
  364. context: .
  365. dockerfile: docker/portail_v2/Dockerfile
  366. volumes:
  367. - ./apps/portail_v2:/home/workspace:rw,cached
  368. tty: true
  369. ports:
  370. - "3010:3000"
  371. - "24680:24680"
  372. environment:
  373. - VIRTUAL_HOST=${PORTAIL_V2_VIRTUAL_HOST}
  374. - VIRTUAL_PORT=${PORTAIL_V2_PORT}
  375. - NODE_ENV=development
  376. - HTTPS_METHOD=noredirect
  377. networks:
  378. network:
  379. ipv4_address: 172.20.2.6
  380. depends_on:
  381. - nginx_new
  382. typo3:
  383. hostname: typo3
  384. container_name: typo3
  385. build:
  386. context: .
  387. dockerfile: docker/typo3/Dockerfile
  388. args:
  389. - COMPOSER_HASH=${COMPOSER_HASH}
  390. restart: always
  391. networks:
  392. network:
  393. ipv4_address: 172.20.3.1
  394. aliases:
  395. - docker.sub.opentalent.fr
  396. - docker.sub.customdomain.fr
  397. volumes:
  398. - ./apps/ot_typo3/ot_admin:/var/opentalent/git/ot_typo3/ot_admin:cached
  399. - ./apps/ot_typo3/ot_connect:/var/opentalent/git/ot_typo3/ot_connect:cached
  400. - ./apps/ot_typo3/ot_core:/var/opentalent/git/ot_typo3/ot_core:cached
  401. - ./apps/ot_typo3/ot_optimizer:/var/opentalent/git/ot_typo3/ot_optimizer:cached
  402. - ./apps/ot_typo3/ot_stats:/var/opentalent/git/ot_typo3/ot_stats:cached
  403. - ./apps/ot_typo3/ot_templating:/var/opentalent/git/ot_typo3/ot_templating:cached
  404. - ./apps/ot_typo3/docker/typo3:/var/www/typo3:cached
  405. environment:
  406. - VIRTUAL_HOST=${TYPO3_VIRTUAL_HOST}
  407. - HTTPS_METHOD=noredirect
  408. - PHP_IDE_CONFIG=servername=typo3
  409. depends_on:
  410. - nginx
  411. # adminassos:
  412. # hostname: v59
  413. # container_name: adminassos
  414. # build:
  415. # context: .
  416. # dockerfile: docker/adminassos/Dockerfile
  417. # args:
  418. # - OS=${OS}
  419. # restart: always
  420. # volumes:
  421. # - ./apps/opentalent:/var/source/opentalent:cached
  422. # - useruploaddata:/var/www/opentalent/fileadmin/user_upload:cached
  423. # - ./apps/vendor:/var/source/vendor:delegated
  424. # - ./apps/opentalent-config:/var/source/config:cached
  425. # environment:
  426. # - VIRTUAL_HOST=${V59_VIRTUAL_HOST}
  427. # networks:
  428. # - network
  429. # depends_on:
  430. # - nginx
  431. metabase:
  432. hostname: metabase
  433. image: metabase/metabase
  434. restart: always
  435. volumes:
  436. - ./metabase-data:/metabase-data
  437. environment:
  438. # - MB_DB_FILE=./metabase-data/metabase.db
  439. - VIRTUAL_HOST=${METABASE_VIRTUAL_HOST}
  440. - VIRTUAL_PORT=${METABASE_PORT}
  441. networks:
  442. - network
  443. depends_on:
  444. - db
  445. es:
  446. hostname: es
  447. container_name: es
  448. image: elasticsearch:2.4.6-alpine
  449. restart: always
  450. volumes:
  451. - elasticsearchdata:/usr/share/elasticsearch/data
  452. - ./docker/elasticsearch/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:cached
  453. environment:
  454. - cluster.name=docker-cluster
  455. - bootstrap.memory_lock=true
  456. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  457. - VIRTUAL_HOST=${ES_VIRTUAL_HOST}
  458. - VIRTUAL_PORT=${ES_PORT}
  459. ulimits:
  460. memlock:
  461. soft: -1
  462. hard: -1
  463. networks:
  464. - network
  465. thumbor:
  466. hostname: thumbor
  467. container_name: thumbor
  468. image: minimalcompact/thumbor
  469. restart: always
  470. environment:
  471. - VIRTUAL_HOST=${THUMBOR_VIRTUAL_HOST}
  472. - LOADER=thumbor.loaders.file_loader
  473. networks:
  474. - network
  475. # volumes:
  476. # - ./apps/opentalent-platform/web/files:/data/loader:cached
  477. phpmyadmin:
  478. hostname: phpmyadmin
  479. container_name: phpmyadmin
  480. image: phpmyadmin/phpmyadmin
  481. environment:
  482. - VIRTUAL_HOST=${PHPMYADMIN_VIRTUAL_HOST}
  483. restart: always
  484. networks:
  485. - network
  486. depends_on:
  487. - db
  488. memcached:
  489. hostname: memcached
  490. container_name: memcached
  491. image: memcached
  492. restart: always
  493. mailcatcher:
  494. hostname: mailcatcher
  495. container_name: mailcatcher
  496. image: sj26/mailcatcher
  497. restart: always
  498. ports:
  499. - "1025:1025"
  500. environment:
  501. - VIRTUAL_HOST=${MAILCATCHER_VIRTUAL_HOST}
  502. - VIRTUAL_PORT=${MAILCATCHER_PORT}
  503. - HTTPS_METHOD=noredirect
  504. networks:
  505. - network
  506. depends_on:
  507. - nginx-proxy
  508. blackfire:
  509. hostname: blackfire
  510. container_name: blackfire
  511. image: blackfire/blackfire
  512. environment:
  513. - BLACKFIRE_LOG_LEVEL=4
  514. - BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID}
  515. - BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN}
  516. - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
  517. - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
  518. - VIRTUAL_HOST=${BLACK_FIRE_VIRTUAL_HOST}
  519. - VIRTUAL_PORT=${BLACK_FIRE_PORT}
  520. networks:
  521. - network
  522. depends_on:
  523. - php70
  524. - ap2i
  525. phpdoc:
  526. hostname: phpdoc
  527. container_name: phpdoc
  528. image: nginx:alpine
  529. volumes:
  530. - ./apps/api-doc:/usr/share/nginx/html
  531. networks:
  532. - network
  533. environment:
  534. - VIRTUAL_HOST=${PHPDOC_VIRTUAL_HOST}
  535. #docker run --rm -v /opt/opentalent/apps/api/src/:/data -v /opt/opentalent/apps/api-doc:/output phpdoc/phpdoc -d /data -t /output
  536. jsdoc:
  537. hostname: jsdoc
  538. container_name: jsdoc
  539. image: nginx:alpine
  540. volumes:
  541. - ./apps/admin-doc:/usr/share/nginx/html
  542. environment:
  543. - VIRTUAL_HOST=${JSDOC_VIRTUAL_HOST}
  544. networks:
  545. - network
  546. networks:
  547. network:
  548. ipam:
  549. config:
  550. - subnet: 172.20.0.0/16
  551. volumes:
  552. mysqldata: ~
  553. elasticsearchdata: ~
  554. useruploaddata: ~
  555. appcache5: ~
  556. applog5: ~
  557. appcache: ~
  558. applog: ~
  559. mercure_data: ~
  560. mercure_config: ~