docker-compose.yml 12 KB

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