docker-compose.yml 14 KB

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