docker-compose.yml 11 KB

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