docker-compose.yml 12 KB

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