docker-compose.yml 13 KB

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