docker-compose.yaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  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. # Version Symfony 2
  65. - appdata:/var/www/html/app/cache/
  66. - appdata:/var/www/html/app/logs/
  67. # ATTENTION : LES VENDROS SONT DELEGUES AU CONTAINER : AUCUNE MODIF FAITES SUR LA MACHINE HOST NE SERA REPLIQUE SUR
  68. # LE CONTAINER ET VICE ET VERSA, mettre en com la ligne pour modifier et décommenter ./apps/opentalent-platform/vendor:/var/www/html/vendor:delegated.
  69. # - appVendor:/var/www/html/vendor/
  70. - ./useruploaddata:/var/www/html/fileadmin/user_upload:cached
  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:cached
  73. # À l'inverse, les vendors seront surtout modifiés dans le container
  74. - ./apps/opentalent-platform/vendor:/var/www/html/vendor:delegated
  75. depends_on:
  76. - db
  77. - es
  78. - thumbor
  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. depends_on:
  90. - ap2i
  91. ap2i:
  92. hostname: ap2i
  93. container_name: ap2i
  94. build:
  95. context: .
  96. dockerfile: docker/ap2i/Dockerfile
  97. args:
  98. - COMPOSER_HASH=${COMPOSER_HASH}
  99. - OS=${OS}
  100. restart: always
  101. environment:
  102. - PHP_IDE_CONFIG=serverName=ap2i
  103. - HTTPS_METHOD=noredirect
  104. volumes:
  105. # Le code sera surtout modifié en dehors du container, donc la consistence est prioritairement dans ce sens
  106. - ./apps/ap2i:/var/www/html:cached
  107. # Version Symfony 5
  108. - appdata5:/var/www/html/var/cache/
  109. - appdata5:/var/www/html/var/log/
  110. - appdata5:/var/www/html/var/files/
  111. # ATTENTION : LES VENDORS SONT DELEGUES AU CONTAINER : AUCUNE MODIF FAITES SUR LA MACHINE HOST NE SERA REPLIQUE SUR
  112. # LE CONTAINER ET VICE ET VERSA, mettre en com la ligne pour modifier et décommenter ./apps/api/New/vendor:/var/www/html/vendor:delegated.
  113. # - appVendor5:/var/www/html/vendor/
  114. # A l'inverse, les vendors seront surtout modifiés dans le container
  115. - ./apps/ap2i/vendor:/var/www/html/vendor:delegated
  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. python39:
  138. hostname: python39
  139. container_name: python39
  140. build:
  141. context: .
  142. dockerfile: docker/python39/Dockerfile
  143. args:
  144. - OS=${OS}
  145. restart: always
  146. volumes:
  147. - ./apps/python-scripts:/root/scripts:cached
  148. depends_on:
  149. - db
  150. - nginx-proxy
  151. admin:
  152. hostname: admin
  153. container_name: admin
  154. build:
  155. context: .
  156. dockerfile: docker/node/Dockerfile
  157. volumes:
  158. - ./apps/opentalent-admin-2.0:/home/workspace:rw,cached
  159. tty: true
  160. ports:
  161. - 3000:3000
  162. - 3001:3001
  163. environment:
  164. - VIRTUAL_HOST=${ADMIN_VIRTUAL_HOST}
  165. - VIRTUAL_PORT=${ADMIN_PORT}
  166. - NODE_ENV=docker
  167. - HTTPS_METHOD=noredirect
  168. depends_on:
  169. - nginx
  170. app:
  171. hostname: app
  172. container_name: app
  173. build:
  174. context: .
  175. dockerfile: docker/app/Dockerfile
  176. volumes:
  177. - ./apps/app:/home/workspace:rw,cached
  178. - ./apps/app-doc:/home/app-doc:rw,cached
  179. tty: true
  180. ports:
  181. - 3002:3002
  182. - 3003:3003
  183. environment:
  184. - VIRTUAL_HOST=${APP_VIRTUAL_HOST}
  185. - VIRTUAL_PORT=${APP_PORT}
  186. - NODE_ENV=docker
  187. - HTTPS_METHOD=noredirect
  188. depends_on:
  189. - nginx_new
  190. frames:
  191. hostname: frames
  192. container_name: frames
  193. build:
  194. context: .
  195. dockerfile: docker/frames/Dockerfile
  196. volumes:
  197. - ./apps/frames:/home/workspace:rw,cached
  198. tty: true
  199. ports:
  200. - 3004:3004
  201. - 3005:3005
  202. environment:
  203. - VIRTUAL_HOST=${FRAMES_VIRTUAL_HOST}
  204. - VIRTUAL_PORT=${FRAMES_PORT}
  205. - NODE_ENV=docker
  206. - HTTPS_METHOD=noredirect
  207. depends_on:
  208. - nginx_new
  209. portail:
  210. hostname: portail
  211. container_name: portail
  212. build:
  213. context: .
  214. dockerfile: docker/portail/Dockerfile
  215. args:
  216. - COMPOSER_HASH=${COMPOSER_HASH}
  217. restart: always
  218. volumes:
  219. - ./docker/portail/conf/LocalConfiguration.php:/var/www/html/typo3conf/LocalConfiguration.php:cached
  220. - ./apps/portail/websites:/var/www/html/websites:cached
  221. - ./apps/opentalent/templates:/var/www/html/fileadmin/templates:cached
  222. - ./apps/portail/themes/BlueSky:/var/www/html/fileadmin/theme_gallery/BlueSky:cached
  223. - ./apps/portail/typo3extension/ot_cms:/var/www/html/typo3conf/ext/ot_cms:cached
  224. - ./apps/portail/typo3extension/ot_migration_typo8:/var/www/html/typo3conf/ext/ot_migration_typo8:cached
  225. - ./apps/portail/typo3extension/ot_portail:/var/www/html/typo3conf/ext/ot_portail:cached
  226. - ./apps/portail/typo3extension/ot_webservice:/var/www/html/typo3conf/ext/ot_webservice:cached
  227. - ./apps/portail/typo3extension/typo3_api:/var/www/html/typo3conf/ext/typo3_api:cached
  228. - ./apps/portail/typo3extension/theme_gallery:/var/www/html/typo3conf/ext/theme_gallery:cached
  229. - ./apps/portail/typo3extension/piwik:/var/www/html/typo3conf/ext/piwik:cached
  230. - ./apps/portail/typo3extension/piwikintegration:/var/www/html/typo3conf/ext/piwikintegration:cached
  231. environment:
  232. - VIRTUAL_HOST=${PORTAIL_VIRTUAL_HOST}
  233. - HTTPS_METHOD=noredirect
  234. depends_on:
  235. - nginx
  236. typo3:
  237. hostname: typo3
  238. container_name: typo3
  239. build:
  240. context: .
  241. dockerfile: docker/typo3/Dockerfile
  242. args:
  243. - COMPOSER_HASH=${COMPOSER_HASH}
  244. restart: always
  245. networks:
  246. default:
  247. aliases:
  248. - docker.sub.opentalent.fr
  249. - docker.sub.customdomain.fr
  250. volumes:
  251. - ./apps/ot_typo3/ot_admin:/var/opentalent/git/ot_typo3/ot_admin:cached
  252. - ./apps/ot_typo3/ot_connect:/var/opentalent/git/ot_typo3/ot_connect:cached
  253. - ./apps/ot_typo3/ot_core:/var/opentalent/git/ot_typo3/ot_core:cached
  254. - ./apps/ot_typo3/ot_optimizer:/var/opentalent/git/ot_typo3/ot_optimizer:cached
  255. - ./apps/ot_typo3/ot_stats:/var/opentalent/git/ot_typo3/ot_stats:cached
  256. - ./apps/ot_typo3/ot_templating:/var/opentalent/git/ot_typo3/ot_templating:cached
  257. - ./apps/ot_typo3/docker/typo3:/var/www/typo3:cached
  258. environment:
  259. - VIRTUAL_HOST=${TYPO3_VIRTUAL_HOST}
  260. - HTTPS_METHOD=noredirect
  261. - PHP_IDE_CONFIG=servername=typo3
  262. depends_on:
  263. - nginx
  264. adminassos:
  265. hostname: v59
  266. container_name: adminassos
  267. build:
  268. context: .
  269. dockerfile: docker/adminassos/Dockerfile
  270. args:
  271. - OS=${OS}
  272. restart: always
  273. volumes:
  274. - ./apps/opentalent:/var/source/opentalent:cached
  275. - ./useruploaddata:/var/www/opentalent/fileadmin/user_upload:cached
  276. - ./apps/vendor:/var/source/vendor:delegated
  277. - ./apps/opentalent-config:/var/source/config:cached
  278. environment:
  279. - VIRTUAL_HOST=${V59_VIRTUAL_HOST}
  280. depends_on:
  281. - nginx
  282. # metabase:
  283. # hostname: metabase
  284. # image: metabase/metabase
  285. # restart: always
  286. # volumes:
  287. # - ./metabase-data:/metabase-data
  288. # environment:
  289. ## - MB_DB_FILE=./metabase-data/metabase.db
  290. # - VIRTUAL_HOST=${METABASE_VIRTUAL_HOST}
  291. # - VIRTUAL_PORT=${METABASE_PORT}
  292. # depends_on:
  293. # - db
  294. es:
  295. hostname: es
  296. container_name: es
  297. image: elasticsearch:2.4.6-alpine
  298. restart: always
  299. volumes:
  300. - ./elasticsearchdata:/usr/share/elasticsearch/data
  301. - ./docker/elasticsearch/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:cached
  302. environment:
  303. - cluster.name=docker-cluster
  304. - bootstrap.memory_lock=true
  305. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  306. - VIRTUAL_HOST=${ES_VIRTUAL_HOST}
  307. - VIRTUAL_PORT=${ES_PORT}
  308. ulimits:
  309. memlock:
  310. soft: -1
  311. hard: -1
  312. thumbor:
  313. hostname: thumbor
  314. container_name: thumbor
  315. image: minimalcompact/thumbor
  316. restart: always
  317. environment:
  318. - VIRTUAL_HOST=${THUMBOR_VIRTUAL_HOST}
  319. - LOADER=thumbor.loaders.file_loader
  320. # volumes:
  321. # - ./apps/opentalent-platform/web/files:/data/loader:cached
  322. phpmyadmin:
  323. hostname: phpmyadmin
  324. container_name: phpmyadmin
  325. image: phpmyadmin/phpmyadmin
  326. environment:
  327. - VIRTUAL_HOST=${PHPMYADMIN_VIRTUAL_HOST}
  328. restart: always
  329. depends_on:
  330. - db
  331. memcached:
  332. hostname: memcached
  333. container_name: memcached
  334. image: memcached
  335. restart: always
  336. mailcatcher:
  337. hostname: mailcatcher
  338. container_name: mailcatcher
  339. image: sj26/mailcatcher
  340. restart: always
  341. ports:
  342. - '1025:1025'
  343. environment:
  344. - VIRTUAL_HOST=${MAILCATCHER_VIRTUAL_HOST}
  345. - VIRTUAL_PORT=${MAILCATCHER_PORT}
  346. - HTTPS_METHOD=noredirect
  347. depends_on:
  348. - nginx-proxy
  349. # blackfire:
  350. # hostname: blackfire
  351. # container_name: blackfire
  352. # image: blackfire/blackfire
  353. # environment:
  354. # - BLACKFIRE_LOG_LEVEL=4
  355. # - BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID}
  356. # - BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN}
  357. # - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
  358. # - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
  359. # - VIRTUAL_HOST=${BLACK_FIRE_VIRTUAL_HOST}
  360. # - VIRTUAL_PORT=${BLACK_FIRE_PORT}
  361. # depends_on:
  362. # - php70
  363. # - ap2i
  364. phpdoc:
  365. hostname: phpdoc
  366. container_name: phpdoc
  367. image: nginx:alpine
  368. volumes:
  369. - ./apps/api-doc:/usr/share/nginx/html
  370. environment:
  371. - VIRTUAL_HOST=${PHPDOC_VIRTUAL_HOST}
  372. #docker run --rm -v /opt/opentalent/apps/api/src/:/data -v /opt/opentalent/apps/api-doc:/output phpdoc/phpdoc -d /data -t /output
  373. jsdoc:
  374. hostname: jsdoc
  375. container_name: jsdoc
  376. image: nginx:alpine
  377. volumes:
  378. - ./apps/admin-doc:/usr/share/nginx/html
  379. environment:
  380. - VIRTUAL_HOST=${JSDOC_VIRTUAL_HOST}
  381. volumes:
  382. mysqldata: ~
  383. elasticsearchdata: ~
  384. # metabase-data: ~
  385. # On rajoute un volume (de données non accessibles en dehors)
  386. appdata: ~
  387. appVendor: ~
  388. appdata5: ~
  389. appVendor5: ~
  390. adminBower: ~
  391. adminNode: ~
  392. mercure_data:
  393. mercure_config: