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