docker-compose.yaml 12 KB

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