docker-compose.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  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. volumes:
  14. - /var/run/docker.sock:/tmp/docker.sock:ro
  15. - /etc/nginx/vhost.d
  16. - /usr/share/nginx/html
  17. db:
  18. hostname: db
  19. container_name: mariaDb
  20. build:
  21. context: .
  22. dockerfile: docker/mariaDb/Dockerfile
  23. args:
  24. - COMPOSER_HASH=${COMPOSER_HASH}
  25. restart: always
  26. ports:
  27. - 3306:3306
  28. volumes:
  29. - ./apps/opentalent-platform/migration:/usr/src:cached
  30. - mysqldata:/var/lib/mysql
  31. - ./apps/env:/env:cached
  32. - ./apps/metabase:/usr/metabase:cached
  33. environment:
  34. MYSQL_ROOT_PASSWORD: ${MYSQL_PASS}
  35. nginx:
  36. hostname: nginx
  37. container_name: nginx
  38. image: nginx:alpine
  39. networks:
  40. default:
  41. aliases:
  42. - docker.nginx.opentalent.fr
  43. volumes:
  44. - ./apps/opentalent-platform/web:/var/www/html/web:cached
  45. - ./docker/nginx/site_php70.conf:/etc/nginx/conf.d/default.conf:cached
  46. environment:
  47. - VIRTUAL_HOST=${API_VIRTUAL_HOST}
  48. depends_on:
  49. - php70
  50. php70:
  51. hostname: api
  52. container_name: php70
  53. build:
  54. context: .
  55. dockerfile: docker/php/Dockerfile
  56. args:
  57. - COMPOSER_HASH=${COMPOSER_HASH}
  58. - OS=${OS}
  59. restart: always
  60. environment:
  61. - PHP_IDE_CONFIG=serverName=api
  62. - HTTPS_METHOD=noredirect
  63. volumes:
  64. # Le code sera surtout modifié en dehors du container, donc la consistence est prioritairement dans ce sens
  65. - ./apps/opentalent-platform:/var/www/html:rw,cached
  66. - appcache:/var/www/html/var/cache
  67. - applog:/var/www/html/var/logs
  68. depends_on:
  69. - db
  70. - es
  71. - thumbor
  72. - nginx-proxy
  73. nginx_new:
  74. hostname: nginx_new
  75. container_name: nginx_new
  76. image: nginx:alpine
  77. volumes:
  78. - ./apps/ap2i/public:/var/www/html/public:cached
  79. - ./docker/nginx/site_ap2i.conf:/etc/nginx/conf.d/default.conf:cached
  80. environment:
  81. - VIRTUAL_HOST=${AP2I_VIRTUAL_HOST}
  82. depends_on:
  83. - ap2i
  84. ap2i:
  85. hostname: ap2i
  86. container_name: ap2i
  87. build:
  88. context: .
  89. dockerfile: docker/ap2i/Dockerfile
  90. args:
  91. - COMPOSER_HASH=${COMPOSER_HASH}
  92. - OS=${OS}
  93. restart: always
  94. environment:
  95. - PHP_IDE_CONFIG=serverName=ap2i
  96. - HTTPS_METHOD=noredirect
  97. - APP_ENV=docker
  98. - APP_DEBUG=1
  99. volumes:
  100. # Le code sera surtout modifié en dehors du container, donc la consistence est prioritairement dans ce sens
  101. - ./apps/ap2i:/var/www/html:rw,cached
  102. - appcache5:/var/www/html/var/cache
  103. - applog5:/var/www/html/var/logs
  104. depends_on:
  105. - db
  106. - es
  107. - thumbor
  108. - nginx-proxy
  109. mercure:
  110. hostname: mercure
  111. container_name: mercure
  112. build:
  113. context: .
  114. dockerfile: docker/mercure/Dockerfile
  115. restart: unless-stopped
  116. environment:
  117. VIRTUAL_HOST: ${MERCURE_VIRTUAL_HOST}
  118. SERVER_NAME: ${MERCURE_VIRTUAL_HOST}
  119. MERCURE_PUBLISHER_JWT_KEY: ${MERCURE_PUBLISHER_JWT_KEY}
  120. MERCURE_SUBSCRIBER_JWT_KEY: ${MERCURE_SUBSCRIBER_JWT_KEY}
  121. volumes:
  122. - mercure_data:/data
  123. - mercure_config:/config
  124. - ./docker/mercure/caddy:/etc/caddy:cached
  125. python39:
  126. hostname: python39
  127. container_name: python39
  128. build:
  129. context: .
  130. dockerfile: docker/python39/Dockerfile
  131. args:
  132. - OS=${OS}
  133. restart: always
  134. volumes:
  135. - ./apps/python-scripts:/root/scripts:cached
  136. depends_on:
  137. - db
  138. - nginx-proxy
  139. admin:
  140. hostname: admin
  141. container_name: admin
  142. build:
  143. context: .
  144. dockerfile: docker/node/Dockerfile
  145. volumes:
  146. - ./apps/opentalent-admin-2.0:/home/workspace:rw,cached
  147. tty: true
  148. ports:
  149. - 3000:3000
  150. - 3001:3001
  151. environment:
  152. - VIRTUAL_HOST=${ADMIN_VIRTUAL_HOST}
  153. - VIRTUAL_PORT=${ADMIN_PORT}
  154. - NODE_ENV=docker
  155. - HTTPS_METHOD=noredirect
  156. depends_on:
  157. - nginx
  158. app:
  159. hostname: app
  160. container_name: app
  161. build:
  162. context: .
  163. dockerfile: docker/app/Dockerfile
  164. volumes:
  165. - ./apps/app:/home/workspace:rw,cached
  166. - ./apps/app-doc:/home/app-doc:rw,cached
  167. tty: true
  168. ports:
  169. - 3002:3002
  170. - 3003:3003
  171. environment:
  172. - VIRTUAL_HOST=${APP_VIRTUAL_HOST}
  173. - VIRTUAL_PORT=${APP_PORT}
  174. - NODE_ENV=docker
  175. - HTTPS_METHOD=noredirect
  176. depends_on:
  177. - nginx_new
  178. app_v3:
  179. hostname: app_v3
  180. container_name: app_v3
  181. build:
  182. context: .
  183. dockerfile: docker/app/Dockerfile
  184. volumes:
  185. - ./apps/app-v3:/home/workspace:rw,cached
  186. tty: true
  187. ports:
  188. - 3004:3000
  189. - 24678:24678
  190. environment:
  191. - VIRTUAL_HOST=${APP_V3_VIRTUAL_HOST}
  192. - VIRTUAL_PORT=${APP_REPORT_PORT}
  193. - NODE_ENV=development
  194. - HTTPS_METHOD=noredirect
  195. depends_on:
  196. - nginx_new
  197. frames:
  198. hostname: frames
  199. container_name: frames
  200. build:
  201. context: .
  202. dockerfile: docker/frames/Dockerfile
  203. volumes:
  204. - ./apps/frames:/home/workspace:rw,cached
  205. tty: true
  206. ports:
  207. - 3004:3004
  208. - 3005:3005
  209. environment:
  210. - VIRTUAL_HOST=${FRAMES_VIRTUAL_HOST}
  211. - VIRTUAL_PORT=${FRAMES_PORT}
  212. - NODE_ENV=docker
  213. - HTTPS_METHOD=noredirect
  214. depends_on:
  215. - nginx_new
  216. portail:
  217. hostname: portail
  218. container_name: portail
  219. build:
  220. context: .
  221. dockerfile: docker/portail/Dockerfile
  222. args:
  223. - COMPOSER_HASH=${COMPOSER_HASH}
  224. restart: always
  225. volumes:
  226. - ./docker/portail/conf/LocalConfiguration.php:/var/www/html/typo3conf/LocalConfiguration.php:cached
  227. - ./apps/portail/websites:/var/www/html/websites:cached
  228. - ./apps/opentalent/templates:/var/www/html/fileadmin/templates:cached
  229. - ./apps/portail/themes/BlueSky:/var/www/html/fileadmin/theme_gallery/BlueSky:cached
  230. - ./apps/portail/typo3extension/ot_cms:/var/www/html/typo3conf/ext/ot_cms:cached
  231. - ./apps/portail/typo3extension/ot_migration_typo8:/var/www/html/typo3conf/ext/ot_migration_typo8:cached
  232. - ./apps/portail/typo3extension/ot_portail:/var/www/html/typo3conf/ext/ot_portail:cached
  233. - ./apps/portail/typo3extension/ot_webservice:/var/www/html/typo3conf/ext/ot_webservice:cached
  234. - ./apps/portail/typo3extension/typo3_api:/var/www/html/typo3conf/ext/typo3_api:cached
  235. - ./apps/portail/typo3extension/theme_gallery:/var/www/html/typo3conf/ext/theme_gallery:cached
  236. - ./apps/portail/typo3extension/piwik:/var/www/html/typo3conf/ext/piwik:cached
  237. - ./apps/portail/typo3extension/piwikintegration:/var/www/html/typo3conf/ext/piwikintegration:cached
  238. environment:
  239. - VIRTUAL_HOST=${PORTAIL_VIRTUAL_HOST}
  240. - HTTPS_METHOD=noredirect
  241. depends_on:
  242. - nginx
  243. typo3:
  244. hostname: typo3
  245. container_name: typo3
  246. build:
  247. context: .
  248. dockerfile: docker/typo3/Dockerfile
  249. args:
  250. - COMPOSER_HASH=${COMPOSER_HASH}
  251. restart: always
  252. networks:
  253. default:
  254. aliases:
  255. - docker.sub.opentalent.fr
  256. - docker.sub.customdomain.fr
  257. volumes:
  258. - ./apps/ot_typo3/ot_admin:/var/opentalent/git/ot_typo3/ot_admin:cached
  259. - ./apps/ot_typo3/ot_connect:/var/opentalent/git/ot_typo3/ot_connect:cached
  260. - ./apps/ot_typo3/ot_core:/var/opentalent/git/ot_typo3/ot_core:cached
  261. - ./apps/ot_typo3/ot_optimizer:/var/opentalent/git/ot_typo3/ot_optimizer:cached
  262. - ./apps/ot_typo3/ot_stats:/var/opentalent/git/ot_typo3/ot_stats:cached
  263. - ./apps/ot_typo3/ot_templating:/var/opentalent/git/ot_typo3/ot_templating:cached
  264. - ./apps/ot_typo3/docker/typo3:/var/www/typo3:cached
  265. environment:
  266. - VIRTUAL_HOST=${TYPO3_VIRTUAL_HOST}
  267. - HTTPS_METHOD=noredirect
  268. - PHP_IDE_CONFIG=servername=typo3
  269. depends_on:
  270. - nginx
  271. adminassos:
  272. hostname: v59
  273. container_name: adminassos
  274. build:
  275. context: .
  276. dockerfile: docker/adminassos/Dockerfile
  277. args:
  278. - OS=${OS}
  279. restart: always
  280. volumes:
  281. - ./apps/opentalent:/var/source/opentalent:cached
  282. - useruploaddata:/var/www/opentalent/fileadmin/user_upload:cached
  283. - ./apps/vendor:/var/source/vendor:delegated
  284. - ./apps/opentalent-config:/var/source/config:cached
  285. environment:
  286. - VIRTUAL_HOST=${V59_VIRTUAL_HOST}
  287. depends_on:
  288. - nginx
  289. metabase:
  290. hostname: metabase
  291. image: metabase/metabase
  292. restart: always
  293. volumes:
  294. - ./metabase-data:/metabase-data
  295. environment:
  296. # - MB_DB_FILE=./metabase-data/metabase.db
  297. - VIRTUAL_HOST=${METABASE_VIRTUAL_HOST}
  298. - VIRTUAL_PORT=${METABASE_PORT}
  299. depends_on:
  300. - db
  301. es:
  302. hostname: es
  303. container_name: es
  304. image: elasticsearch:2.4.6-alpine
  305. restart: always
  306. volumes:
  307. - elasticsearchdata:/usr/share/elasticsearch/data
  308. - ./docker/elasticsearch/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:cached
  309. environment:
  310. - cluster.name=docker-cluster
  311. - bootstrap.memory_lock=true
  312. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  313. - VIRTUAL_HOST=${ES_VIRTUAL_HOST}
  314. - VIRTUAL_PORT=${ES_PORT}
  315. ulimits:
  316. memlock:
  317. soft: -1
  318. hard: -1
  319. thumbor:
  320. hostname: thumbor
  321. container_name: thumbor
  322. image: minimalcompact/thumbor
  323. restart: always
  324. environment:
  325. - VIRTUAL_HOST=${THUMBOR_VIRTUAL_HOST}
  326. - LOADER=thumbor.loaders.file_loader
  327. # volumes:
  328. # - ./apps/opentalent-platform/web/files:/data/loader:cached
  329. phpmyadmin:
  330. hostname: phpmyadmin
  331. container_name: phpmyadmin
  332. image: phpmyadmin/phpmyadmin
  333. environment:
  334. - VIRTUAL_HOST=${PHPMYADMIN_VIRTUAL_HOST}
  335. restart: always
  336. depends_on:
  337. - db
  338. memcached:
  339. hostname: memcached
  340. container_name: memcached
  341. image: memcached
  342. restart: always
  343. mailcatcher:
  344. hostname: mailcatcher
  345. container_name: mailcatcher
  346. image: sj26/mailcatcher
  347. restart: always
  348. ports:
  349. - '1025:1025'
  350. environment:
  351. - VIRTUAL_HOST=${MAILCATCHER_VIRTUAL_HOST}
  352. - VIRTUAL_PORT=${MAILCATCHER_PORT}
  353. - HTTPS_METHOD=noredirect
  354. depends_on:
  355. - nginx-proxy
  356. blackfire:
  357. hostname: blackfire
  358. container_name: blackfire
  359. image: blackfire/blackfire
  360. environment:
  361. - BLACKFIRE_LOG_LEVEL=4
  362. - BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID}
  363. - BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN}
  364. - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
  365. - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
  366. - VIRTUAL_HOST=${BLACK_FIRE_VIRTUAL_HOST}
  367. - VIRTUAL_PORT=${BLACK_FIRE_PORT}
  368. depends_on:
  369. - php70
  370. - ap2i
  371. phpdoc:
  372. hostname: phpdoc
  373. container_name: phpdoc
  374. image: nginx:alpine
  375. volumes:
  376. - ./apps/api-doc:/usr/share/nginx/html
  377. environment:
  378. - VIRTUAL_HOST=${PHPDOC_VIRTUAL_HOST}
  379. #docker run --rm -v /opt/opentalent/apps/api/src/:/data -v /opt/opentalent/apps/api-doc:/output phpdoc/phpdoc -d /data -t /output
  380. jsdoc:
  381. hostname: jsdoc
  382. container_name: jsdoc
  383. image: nginx:alpine
  384. volumes:
  385. - ./apps/admin-doc:/usr/share/nginx/html
  386. environment:
  387. - VIRTUAL_HOST=${JSDOC_VIRTUAL_HOST}
  388. volumes:
  389. mysqldata: ~
  390. elasticsearchdata: ~
  391. useruploaddata: ~
  392. appcache5: ~
  393. applog5: ~
  394. appcache: ~
  395. applog: ~
  396. mercure_data: ~
  397. mercure_config: ~