docker-compose.yml 13 KB

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