docker-compose.yml 13 KB

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