docker-compose.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  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. environment:
  14. TRUST_DOWNSTREAM_PROXY: 1
  15. networks:
  16. - network
  17. volumes:
  18. - /var/run/docker.sock:/tmp/docker.sock:ro
  19. - /etc/nginx/vhost.d
  20. - /usr/share/nginx/html
  21. db:
  22. hostname: db
  23. container_name: mariaDb
  24. build:
  25. context: .
  26. dockerfile: docker/mariaDb/Dockerfile
  27. args:
  28. - COMPOSER_HASH=${COMPOSER_HASH}
  29. restart: always
  30. ports:
  31. - "3306:3306"
  32. volumes:
  33. - ./apps/opentalent-platform/migration:/usr/src:cached
  34. - mysqldata:/var/lib/mysql
  35. - ./apps/env:/env:cached
  36. - ./apps/metabase:/usr/metabase:cached
  37. environment:
  38. MYSQL_ROOT_PASSWORD: ${MYSQL_PASS}
  39. networks:
  40. network:
  41. ipv4_address: 172.20.1.3
  42. nginx:
  43. hostname: nginx
  44. container_name: nginx
  45. image: nginx:alpine
  46. volumes:
  47. - ./apps/opentalent-platform/web:/var/www/html/web:cached
  48. - ./docker/nginx/site_php70.conf:/etc/nginx/conf.d/default.conf:cached
  49. environment:
  50. - VIRTUAL_HOST=${API_VIRTUAL_HOST}
  51. networks:
  52. network:
  53. aliases:
  54. - docker.nginx.opentalent.fr
  55. depends_on:
  56. - php70
  57. php70:
  58. hostname: api
  59. container_name: php70
  60. build:
  61. context: .
  62. dockerfile: docker/php/Dockerfile
  63. args:
  64. - COMPOSER_HASH=${COMPOSER_HASH}
  65. - OS=${OS}
  66. restart: always
  67. environment:
  68. - PHP_IDE_CONFIG=serverName=api
  69. - HTTPS_METHOD=noredirect
  70. volumes:
  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:rw,cached
  73. networks:
  74. network:
  75. ipv4_address: 172.20.1.1
  76. depends_on:
  77. - db
  78. - es
  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. networks:
  90. - network
  91. depends_on:
  92. - ap2i
  93. nginx_maestro:
  94. hostname: nginx_maestro
  95. container_name: nginx_maestro
  96. image: nginx:alpine
  97. volumes:
  98. - ./apps/maestro/public:/var/www/html/public:cached
  99. - ./docker/nginx/site_maestro.conf:/etc/nginx/conf.d/default.conf:cached
  100. environment:
  101. - VIRTUAL_HOST=${MAESTRO_VIRTUAL_HOST}
  102. networks:
  103. - network
  104. depends_on:
  105. - maestro
  106. maestro:
  107. hostname: maestro
  108. container_name: maestro
  109. build:
  110. context: .
  111. dockerfile: docker/maestro/Dockerfile
  112. args:
  113. - COMPOSER_HASH=${COMPOSER_HASH}
  114. - OS=${OS}
  115. - HOST=${HOST}
  116. restart: always
  117. environment:
  118. - PHP_IDE_CONFIG=serverName=maestro
  119. - HTTPS_METHOD=noredirect
  120. - APP_ENV=dev
  121. - APP_DEBUG=1
  122. volumes:
  123. - ./apps/maestro:/var/www/html:rw,cached
  124. networks:
  125. network:
  126. ipv4_address: 172.20.1.8
  127. depends_on:
  128. - nginx-proxy
  129. ap2i:
  130. hostname: ap2i
  131. container_name: ap2i
  132. build:
  133. context: .
  134. dockerfile: docker/ap2i/Dockerfile
  135. args:
  136. - COMPOSER_HASH=${COMPOSER_HASH}
  137. - OS=${OS}
  138. - HOST=${HOST}
  139. restart: always
  140. environment:
  141. - PHP_IDE_CONFIG=serverName=ap2i
  142. - HTTPS_METHOD=noredirect
  143. - APP_ENV=docker
  144. - APP_DEBUG=1
  145. volumes:
  146. # Le code sera surtout modifié en dehors du container, donc la consistence est prioritairement dans ce sens
  147. - ./apps/ap2i:/var/www/html:rw,cached
  148. networks:
  149. network:
  150. ipv4_address: 172.20.2.1
  151. depends_on:
  152. - db
  153. - es
  154. - nginx-proxy
  155. mercure:
  156. hostname: mercure
  157. container_name: mercure
  158. build:
  159. context: .
  160. dockerfile: docker/mercure/Dockerfile
  161. restart: unless-stopped
  162. environment:
  163. VIRTUAL_HOST: ${MERCURE_VIRTUAL_HOST}
  164. SERVER_NAME: ${MERCURE_VIRTUAL_HOST}
  165. MERCURE_PUBLISHER_JWT_KEY: ${MERCURE_PUBLISHER_JWT_KEY}
  166. MERCURE_SUBSCRIBER_JWT_KEY: ${MERCURE_SUBSCRIBER_JWT_KEY}
  167. volumes:
  168. - mercure_data:/data
  169. - mercure_config:/config
  170. - ./docker/mercure/caddy:/etc/caddy:cached
  171. networks:
  172. network:
  173. ipv4_address: 172.20.4.0
  174. python39:
  175. hostname: python39
  176. container_name: python39
  177. build:
  178. context: .
  179. dockerfile: docker/python39/Dockerfile
  180. args:
  181. - OS=${OS}
  182. restart: always
  183. volumes:
  184. - ./apps/python-scripts:/root/scripts:cached
  185. networks:
  186. network:
  187. ipv4_address: 172.20.4.1
  188. depends_on:
  189. - db
  190. - nginx-proxy
  191. admin:
  192. hostname: admin
  193. container_name: admin
  194. build:
  195. context: .
  196. dockerfile: docker/node/Dockerfile
  197. volumes:
  198. - ./apps/opentalent-admin-2.0:/home/workspace:rw,cached
  199. tty: true
  200. ports:
  201. - "3000:3000"
  202. - "3001:3001"
  203. environment:
  204. - VIRTUAL_HOST=${ADMIN_VIRTUAL_HOST}
  205. - VIRTUAL_PORT=${ADMIN_PORT}
  206. - NODE_ENV=docker
  207. - HTTPS_METHOD=noredirect
  208. networks:
  209. network:
  210. ipv4_address: 172.20.1.2
  211. depends_on:
  212. - nginx
  213. app:
  214. hostname: app
  215. container_name: app
  216. build:
  217. context: .
  218. dockerfile: docker/app/Dockerfile
  219. volumes:
  220. - ./apps/app:/home/workspace:rw,cached
  221. tty: true
  222. ports:
  223. - "3009:3000"
  224. - "24678:24678"
  225. environment:
  226. - VIRTUAL_HOST=${APP_VIRTUAL_HOST}
  227. - VIRTUAL_PORT=${APP_PORT}
  228. - NODE_ENV=development
  229. - HTTPS_METHOD=noredirect
  230. networks:
  231. network:
  232. ipv4_address: 172.20.2.3
  233. depends_on:
  234. - nginx_new
  235. agenda:
  236. hostname: agenda
  237. container_name: agenda
  238. build:
  239. context: .
  240. dockerfile: docker/agenda/Dockerfile
  241. volumes:
  242. - ./apps/agenda:/home/workspace:rw,cached
  243. - ./apps/nuxt_common:/home/workspace/nuxt_common:rw,cached
  244. tty: true
  245. ports:
  246. - "3007:3000"
  247. - "24679:24679"
  248. environment:
  249. - VIRTUAL_HOST=${AGENDA_VIRTUAL_HOST}
  250. - VIRTUAL_PORT=${AGENDA_PORT}
  251. - NODE_ENV=development
  252. - HTTPS_METHOD=noredirect
  253. networks:
  254. network:
  255. ipv4_address: 172.20.2.5
  256. depends_on:
  257. - nginx_new
  258. nuxt_common:
  259. hostname: nuxt_common
  260. container_name: nuxt_common
  261. build:
  262. context: .
  263. dockerfile: docker/nuxt_common/Dockerfile
  264. volumes:
  265. - ./apps/nuxt_common:/home/workspace:rw,cached
  266. tty: true
  267. ports:
  268. - "3006:3000"
  269. - "24669:24669"
  270. environment:
  271. - VIRTUAL_HOST=${NUXT_COMMON_VIRTUAL_HOST}
  272. - VIRTUAL_PORT=${NUXT_COMMON_PORT}
  273. - NODE_ENV=development
  274. - HTTPS_METHOD=noredirect
  275. networks:
  276. network:
  277. ipv4_address: 172.20.2.9
  278. depends_on:
  279. - nginx_new
  280. site_logiciels:
  281. hostname: site_logiciels
  282. container_name: site_logiciels
  283. build:
  284. context: .
  285. dockerfile: docker/site_logiciels/Dockerfile
  286. volumes:
  287. - ./apps/site_logiciels:/home/workspace:rw,cached
  288. tty: true
  289. ports:
  290. - "3010:3000"
  291. - "24680:24680"
  292. environment:
  293. - VIRTUAL_HOST=${SITE_LOGICIELS_VIRTUAL_HOST}
  294. - VIRTUAL_PORT=${SITE_LOGICIELS_PORT}
  295. - NODE_ENV=development
  296. - HTTPS_METHOD=noredirect
  297. networks:
  298. network:
  299. ipv4_address: 172.20.2.6
  300. depends_on:
  301. - nginx-proxy
  302. typo3:
  303. hostname: typo3
  304. container_name: typo3
  305. build:
  306. context: .
  307. dockerfile: docker/typo3/Dockerfile
  308. args:
  309. - COMPOSER_HASH=${COMPOSER_HASH}
  310. restart: always
  311. networks:
  312. network:
  313. ipv4_address: 172.20.3.1
  314. aliases:
  315. - docker.sub.opentalent.fr
  316. - docker.sub.customdomain.fr
  317. volumes:
  318. - ./apps/ot_typo3:/var/opentalent/git/ot_typo3:cached
  319. - ./apps/ot_typo3/docker/typo3:/var/www/typo3:cached
  320. environment:
  321. - VIRTUAL_HOST=${TYPO3_VIRTUAL_HOST}
  322. - HTTPS_METHOD=noredirect
  323. - PHP_IDE_CONFIG=servername=typo3
  324. depends_on:
  325. - nginx
  326. # adminassos:
  327. # hostname: v59
  328. # container_name: adminassos
  329. # build:
  330. # context: .
  331. # dockerfile: docker/adminassos/Dockerfile
  332. # args:
  333. # - OS=${OS}
  334. # restart: always
  335. # volumes:
  336. # - ./apps/opentalent:/var/source/opentalent:cached
  337. # - useruploaddata:/var/www/opentalent/fileadmin/user_upload:cached
  338. # - ./apps/vendor:/var/source/vendor:delegated
  339. # - ./apps/opentalent-config:/var/source/config:cached
  340. # environment:
  341. # - VIRTUAL_HOST=${V59_VIRTUAL_HOST}
  342. # networks:
  343. # - network
  344. # depends_on:
  345. # - nginx
  346. metabase:
  347. hostname: metabase
  348. image: metabase/metabase
  349. restart: always
  350. volumes:
  351. - ./metabase-data:/metabase-data
  352. environment:
  353. # - MB_DB_FILE=./metabase-data/metabase.db
  354. - VIRTUAL_HOST=${METABASE_VIRTUAL_HOST}
  355. - VIRTUAL_PORT=${METABASE_PORT}
  356. networks:
  357. - network
  358. depends_on:
  359. - db
  360. es:
  361. hostname: es
  362. container_name: es
  363. image: elasticsearch:2.4.6-alpine
  364. restart: always
  365. volumes:
  366. - elasticsearchdata:/usr/share/elasticsearch/data
  367. - ./docker/elasticsearch/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:cached
  368. environment:
  369. - cluster.name=docker-cluster
  370. - bootstrap.memory_lock=true
  371. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  372. - VIRTUAL_HOST=${ES_VIRTUAL_HOST}
  373. - VIRTUAL_PORT=${ES_PORT}
  374. ulimits:
  375. memlock:
  376. soft: -1
  377. hard: -1
  378. networks:
  379. - network
  380. phpmyadmin:
  381. hostname: phpmyadmin
  382. container_name: phpmyadmin
  383. image: phpmyadmin/phpmyadmin
  384. environment:
  385. - VIRTUAL_HOST=${PHPMYADMIN_VIRTUAL_HOST}
  386. restart: always
  387. networks:
  388. - network
  389. depends_on:
  390. - db
  391. memcached:
  392. hostname: memcached
  393. container_name: memcached
  394. image: memcached
  395. restart: always
  396. mailcatcher:
  397. hostname: mailcatcher
  398. container_name: mailcatcher
  399. image: sj26/mailcatcher
  400. restart: always
  401. ports:
  402. - "1025:1025"
  403. environment:
  404. - VIRTUAL_HOST=${MAILCATCHER_VIRTUAL_HOST}
  405. - VIRTUAL_PORT=${MAILCATCHER_PORT}
  406. - HTTPS_METHOD=noredirect
  407. networks:
  408. - network
  409. depends_on:
  410. - nginx-proxy
  411. # blackfire:
  412. # hostname: blackfire
  413. # container_name: blackfire
  414. # image: blackfire/blackfire
  415. # environment:
  416. # - BLACKFIRE_LOG_LEVEL=4
  417. # - BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID}
  418. # - BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN}
  419. # - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
  420. # - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
  421. # - VIRTUAL_HOST=${BLACK_FIRE_VIRTUAL_HOST}
  422. # - VIRTUAL_PORT=${BLACK_FIRE_PORT}
  423. # networks:
  424. # - network
  425. # depends_on:
  426. # - php70
  427. # - ap2i
  428. phpdoc:
  429. hostname: phpdoc
  430. container_name: phpdoc
  431. image: nginx:alpine
  432. volumes:
  433. - ./apps/api-doc:/usr/share/nginx/html
  434. networks:
  435. - network
  436. environment:
  437. - VIRTUAL_HOST=${PHPDOC_VIRTUAL_HOST}
  438. #docker run --rm -v /opt/opentalent/apps/api/src/:/data -v /opt/opentalent/apps/api-doc:/output phpdoc/phpdoc -d /data -t /output
  439. jsdoc:
  440. hostname: jsdoc
  441. container_name: jsdoc
  442. image: nginx:alpine
  443. volumes:
  444. - ./apps/admin-doc:/usr/share/nginx/html
  445. environment:
  446. - VIRTUAL_HOST=${JSDOC_VIRTUAL_HOST}
  447. networks:
  448. - network
  449. networks:
  450. network:
  451. ipam:
  452. config:
  453. - subnet: 172.20.0.0/16
  454. volumes:
  455. mysqldata: ~
  456. elasticsearchdata: ~
  457. useruploaddata: ~
  458. mercure_data: ~
  459. mercure_config: ~