docker-compose.yaml 12 KB

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