docker-compose.yml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  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. portail_v2:
  332. hostname: portail_v2
  333. container_name: portail_v2
  334. build:
  335. context: .
  336. dockerfile: docker/portail_v2/Dockerfile
  337. volumes:
  338. - ./apps/portail_v2:/home/workspace:rw,cached
  339. tty: true
  340. ports:
  341. - "3010:3000"
  342. - "24680:24680"
  343. environment:
  344. - VIRTUAL_HOST=${PORTAIL_V2_VIRTUAL_HOST}
  345. - VIRTUAL_PORT=${PORTAIL_V2_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_new
  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. # adminassos:
  378. # hostname: v59
  379. # container_name: adminassos
  380. # build:
  381. # context: .
  382. # dockerfile: docker/adminassos/Dockerfile
  383. # args:
  384. # - OS=${OS}
  385. # restart: always
  386. # volumes:
  387. # - ./apps/opentalent:/var/source/opentalent:cached
  388. # - useruploaddata:/var/www/opentalent/fileadmin/user_upload:cached
  389. # - ./apps/vendor:/var/source/vendor:delegated
  390. # - ./apps/opentalent-config:/var/source/config:cached
  391. # environment:
  392. # - VIRTUAL_HOST=${V59_VIRTUAL_HOST}
  393. # networks:
  394. # - network
  395. # depends_on:
  396. # - nginx
  397. metabase:
  398. hostname: metabase
  399. image: metabase/metabase
  400. restart: always
  401. volumes:
  402. - ./metabase-data:/metabase-data
  403. environment:
  404. # - MB_DB_FILE=./metabase-data/metabase.db
  405. - VIRTUAL_HOST=${METABASE_VIRTUAL_HOST}
  406. - VIRTUAL_PORT=${METABASE_PORT}
  407. networks:
  408. - network
  409. depends_on:
  410. - db
  411. es:
  412. hostname: es
  413. container_name: es
  414. image: elasticsearch:2.4.6-alpine
  415. restart: always
  416. volumes:
  417. - elasticsearchdata:/usr/share/elasticsearch/data
  418. - ./docker/elasticsearch/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:cached
  419. environment:
  420. - cluster.name=docker-cluster
  421. - bootstrap.memory_lock=true
  422. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  423. - VIRTUAL_HOST=${ES_VIRTUAL_HOST}
  424. - VIRTUAL_PORT=${ES_PORT}
  425. ulimits:
  426. memlock:
  427. soft: -1
  428. hard: -1
  429. networks:
  430. - network
  431. phpmyadmin:
  432. hostname: phpmyadmin
  433. container_name: phpmyadmin
  434. image: phpmyadmin/phpmyadmin
  435. environment:
  436. - VIRTUAL_HOST=${PHPMYADMIN_VIRTUAL_HOST}
  437. restart: always
  438. networks:
  439. - network
  440. depends_on:
  441. - db
  442. memcached:
  443. hostname: memcached
  444. container_name: memcached
  445. image: memcached
  446. restart: always
  447. mailcatcher:
  448. hostname: mailcatcher
  449. container_name: mailcatcher
  450. image: sj26/mailcatcher
  451. restart: always
  452. ports:
  453. - "1025:1025"
  454. environment:
  455. - VIRTUAL_HOST=${MAILCATCHER_VIRTUAL_HOST}
  456. - VIRTUAL_PORT=${MAILCATCHER_PORT}
  457. - HTTPS_METHOD=noredirect
  458. networks:
  459. - network
  460. depends_on:
  461. - nginx-proxy
  462. # blackfire:
  463. # hostname: blackfire
  464. # container_name: blackfire
  465. # image: blackfire/blackfire
  466. # environment:
  467. # - BLACKFIRE_LOG_LEVEL=4
  468. # - BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID}
  469. # - BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN}
  470. # - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
  471. # - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
  472. # - VIRTUAL_HOST=${BLACK_FIRE_VIRTUAL_HOST}
  473. # - VIRTUAL_PORT=${BLACK_FIRE_PORT}
  474. # networks:
  475. # - network
  476. # depends_on:
  477. # - php70
  478. # - ap2i
  479. phpdoc:
  480. hostname: phpdoc
  481. container_name: phpdoc
  482. image: nginx:alpine
  483. volumes:
  484. - ./apps/api-doc:/usr/share/nginx/html
  485. networks:
  486. - network
  487. environment:
  488. - VIRTUAL_HOST=${PHPDOC_VIRTUAL_HOST}
  489. #docker run --rm -v /opt/opentalent/apps/api/src/:/data -v /opt/opentalent/apps/api-doc:/output phpdoc/phpdoc -d /data -t /output
  490. jsdoc:
  491. hostname: jsdoc
  492. container_name: jsdoc
  493. image: nginx:alpine
  494. volumes:
  495. - ./apps/admin-doc:/usr/share/nginx/html
  496. environment:
  497. - VIRTUAL_HOST=${JSDOC_VIRTUAL_HOST}
  498. networks:
  499. - network
  500. networks:
  501. network:
  502. ipam:
  503. config:
  504. - subnet: 172.20.0.0/16
  505. volumes:
  506. mysqldata: ~
  507. elasticsearchdata: ~
  508. useruploaddata: ~
  509. mercure_data: ~
  510. mercure_config: ~