docker-compose.yml 12 KB

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