docker-compose.yml 14 KB

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