docker-compose.yml 11 KB

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