docker-compose.yaml 12 KB

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