Advertisement
Guest User

b docker compose

a guest
Sep 24th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.43 KB | None | 0 0
  1. #filename: docker-compose-local-a.yml
  2. version: '3.3'
  3.  
  4.  
  5. volumes:
  6. mongo_db_data:
  7. redis_db_data:
  8. backend_data:
  9. api_gateway_keys:
  10.  
  11.  
  12.  
  13. networks:
  14. anyvision:
  15. # driver: bridge
  16. # ipam:
  17. # driver: default
  18. # config:
  19. # - subnet: 172.14.0.0/16
  20.  
  21.  
  22. services:
  23.  
  24. # Enable coredns when need
  25. # coredns:
  26. # image: coredns/coredns:1.2.0
  27. # command: -conf /conf/Corefile
  28. # restart: always
  29. # networks:
  30. # anyvision:
  31. # ipv4_address: 172.14.0.250
  32. # ports:
  33. # - "<external b server ip>:53:53/udp" ### replace 127.0.0.1 bind address with server external IP for listening to remote connections (A/B config)
  34. # - "<external b server ip>:53:53/tcp" ### replace 127.0.0.1 bind address with server external IP for listening to remote connections (A/B config)
  35. # - "9153:9153/tcp"
  36. # volumes:
  37. # - ../../coredns/Corefile:/conf/Corefile
  38. # - ../../coredns/db.anyvision.local:/conf/db.anyvision.local
  39. # - /etc/localtime:/etc/localtime:ro
  40. # - /etc/timezone:/etc/timezone:ro
  41. # cap_drop:
  42. # - ALL
  43. # cap_add:
  44. # - NET_BIND_SERVICE
  45. # read_only: true
  46.  
  47. guacamole:
  48. image: gcr.io/anyvision-training/guacamole:0.9.14
  49. restart: always
  50. networks:
  51. - anyvision
  52. ports:
  53. - "8080:8080"
  54. volumes:
  55. - ../../guacamole/user-mapping-local.xml:/etc/guacamole/user-mapping.xml
  56. - /etc/localtime:/etc/localtime:ro
  57. env_file:
  58. - ../../env/global.env
  59. logging:
  60. options:
  61. max-size: 1g
  62.  
  63.  
  64.  
  65. sftp:
  66. image: atmoz/sftp:latest
  67. restart: always
  68. networks:
  69. - anyvision
  70. volumes:
  71. - /storage/sftp_data:/home/user
  72. - /etc/localtime:/etc/localtime:ro
  73. command: user:pass:2000:2000:files
  74. env_file:
  75. - ../../env/global.env
  76. logging:
  77. options:
  78. max-size: 1g
  79.  
  80.  
  81.  
  82. nginx:
  83. image: gcr.io/anyvision-training/nginx-rtmp:ssl
  84. restart: always
  85. networks:
  86. anyvision:
  87. aliases:
  88. - nginx-b.anyvision.local
  89. ports:
  90. - "1935:1935"
  91. - "443:443"
  92. - "80:80"
  93. volumes:
  94. - /storage:/opt/nginx/html:ro
  95. - /usr/local/share/ca-certificates/anyvision:/usr/local/share/ca-certificates/anyvision
  96. - /etc/localtime:/etc/localtime:ro
  97. environment:
  98. - limit_rate_speed=0
  99. - TO_DATE_TRACK_DELETE=30
  100. env_file:
  101. - ../../env/global.env
  102. logging:
  103. options:
  104. max-size: 1g
  105.  
  106. cron:
  107. image: gcr.io/anyvision-training/supercronic:latest
  108. restart: always
  109. networks:
  110. anyvision:
  111. aliases:
  112. - cron-b.anyvision.local
  113. volumes:
  114. - /storage:/var/www/html
  115. - ../../crontab/site_crontab:/etc/crontabs/crontab
  116. - /etc/localtime:/etc/localtime:ro
  117. logging:
  118. options:
  119. max-size: 1g
  120.  
  121. mongodb:
  122. image: 'gcr.io/anyvision-training/mongo:3.6-jessie'
  123. restart: always
  124. networks:
  125. anyvision:
  126. aliases:
  127. - mongodb.anyvision.local
  128. #ports:
  129. # - "27017:27017"
  130. volumes:
  131. - mongo_db_data:/data/db
  132. - /etc/localtime:/etc/localtime:ro
  133. env_file:
  134. - ../../env/global.env
  135. logging:
  136. options:
  137. max-size: 1g
  138.  
  139.  
  140.  
  141. redis:
  142. image: 'gcr.io/anyvision-training/redis:latest'
  143. restart: always
  144. networks:
  145. - anyvision
  146. sysctls:
  147. - net.core.somaxconn=511
  148. volumes:
  149. - redis_db_data:/data:rw
  150. - /etc/localtime:/etc/localtime:ro
  151. logging:
  152. options:
  153. max-size: 1g
  154.  
  155.  
  156.  
  157. apigateway:
  158. image: 'gcr.io/anyvision-training/api-gateway:development'
  159. restart: always
  160. #command: --disable-services --no-exitkills --debug sleep infinity ### development mode - disable chaperone init
  161. networks:
  162. anyvision:
  163. aliases:
  164. - apigateway.anyvision.local
  165. ports:
  166. - "9443:9443"
  167. #- "38391:38391"
  168. #dns: 172.14.0.250 ### internal DNS server address, replace this with external IP of CoreDNS server (A/B config)
  169. volumes:
  170. - /storage:/var/www/html
  171. - api_gateway_keys:/home/user/api-gateway/config/keys
  172. - /usr/local/share/ca-certificates/anyvision:/usr/local/share/ca-certificates/anyvision
  173. - /etc/localtime:/etc/localtime:ro
  174. #- /home/anyvision/Projects/API-gateway:/home/user/api-gateway ### mount your local project directory to the container
  175. depends_on:
  176. - redis
  177. environment:
  178. #- NODE_DEBUG_OPTION=--inspect=0.0.0.0:38391
  179. - RUN_AS_USER=user
  180. - ENABLE_CHOWN=false
  181. env_file:
  182. - ../../env/api-gateway.env
  183. - ../../env/global.env
  184. logging:
  185. options:
  186. max-size: 1g
  187.  
  188.  
  189.  
  190. api:
  191. image: 'gcr.io/anyvision-training/api:development'
  192. restart: always
  193. networks:
  194. anyvision:
  195. aliases:
  196. - api.anyvision.local
  197. extra_hosts:
  198. - proc-a01.anyvision.local:192.168.0.150
  199. - nginx-a01.anyvision.local:192.168.0.150
  200. - proc-a02.anyvision.local:192.168.0.151
  201. - nginx-a02.anyvision.local:192.168.0.151
  202. # - proc-a03.anyvision.local:<ip of a03 server>
  203. # - nginx-a03.anyvision.local:<ip of a03 server>
  204. # - proc-a04.anyvision.local:<ip of a04 server>
  205. # - nginx-a04.anyvision.local:<ip of a04 server>
  206. ports:
  207. - "5443:5443"
  208. - "3000:3000"
  209. #- "38389:38389"
  210. #dns: 172.14.0.250 ### internal DNS server address, replace this with external IP of CoreDNS server (A/B config)
  211. volumes:
  212. - /storage:/var/www/html
  213. - /usr/local/share/ca-certificates/anyvision:/usr/local/share/ca-certificates/anyvision
  214. - /etc/localtime:/etc/localtime:ro
  215. #- /home/anyvision/Projects/Dash-API:/home/user/Dash-API ### mount your local project directory to the container
  216. environment:
  217. #- NODE_DEBUG_OPTION=--inspect=0.0.0.0:38389
  218. - API_IP=api.anyvision.local
  219. - MONGO_DB_IP=mongodb.anyvision.local
  220. - CA_HOST=apigateway.anyvision.local
  221. - RUN_AS_USER=user
  222. - ENABLE_CHOWN=false
  223. - MASS_IMPORT_IP=reid-b.anyvision.local ### use this configuration to configure the "b" server reid service in a/b architecture
  224. env_file:
  225. - ../../env/global.env
  226. - ../../env/api.env
  227. logging:
  228. options:
  229. max-size: 1g
  230.  
  231.  
  232.  
  233. backend:
  234. image: 'gcr.io/anyvision-training/backend-pyconcrete:development'
  235. restart: always
  236. #command: --disable-services --no-exitkills --debug sleep infinity ### development mode - disable chaperone init
  237. privileged: true ## FOR ACCESSING DEVICES - NOT HOT-PLUGGABLE
  238. networks:
  239. anyvision:
  240. aliases:
  241. - proc-b.anyvision.local
  242. - reid-b.anyvision.local
  243. - coll-b.anyvision.local
  244. - arch-b.anyvision.local
  245. ports:
  246. - "4005:4005"
  247. - "9067:9067"
  248. - "9068:9068"
  249. - "9069:9069"
  250. - "5000-5025:5000-5025/udp" ### for remote VMS rtsp connections
  251. #dns: 172.14.0.250 ### internal DNS server address, replace this with external IP of CoreDNS server (A/B config)
  252. extra_hosts:
  253. - nginx-a01.anyvision.local:192.168.0.150
  254. volumes:
  255. - /home/user/license:/home/user/license:ro
  256. - backend_data:/root/pipe_data
  257. - /storage:/var/www/html
  258. - /usr/local/share/ca-certificates/anyvision:/usr/local/share/ca-certificates/anyvision
  259. - /tmp/.X11-unix:/tmp/.X11-unix:rw
  260. - /dev:/dev
  261. - /etc/localtime:/etc/localtime:ro
  262. #- /root/backend_trunk:/root/backend_trunk ### mount your local project directory to the container
  263. environment:
  264. - DISPLAY ### local display mode - do not forget to run "xhost +" as your local host user (not as root)
  265. - external_ip=proc-b.anyvision.local
  266. - storage_ip=nginx-b.anyvision.local
  267. - frame_store_storage_ip=nginx-b.anyvision.local
  268. - redis_host=127.0.0.1
  269. - api_service_ip=api.anyvision.local
  270. - mongodb_host=mongodb.anyvision.local
  271. - reid_service_ip=reid-b.anyvision.local
  272. - collate_service_ip=coll-b.anyvision.local
  273. - track_archive_service_ip=arch-b.anyvision.local
  274. - ENABLE_FRAMESTORE_CLEANER=false
  275. - ENABLE_PROCESS_SERVICE=false
  276. - ENABLE_XPRA_SERVICE=false
  277. - ENABLE_CRON_PIPE_IMG_TEMPORARY=false
  278. env_file:
  279. - ../../env/backend.env
  280. - ../../env/global.env
  281. logging:
  282. options:
  283. max-size: 1g
  284. ipc: host
  285.  
  286. dashboard:
  287. image: 'gcr.io/anyvision-training/dashboard:development'
  288. restart: always
  289. #command: --disable-services --no-exitkills --debug sleep infinity ### development mode - disable chaperone init
  290. privileged: true ## FOR ACCESSING DEVICES - NOT HOT-PLUGGABLE
  291. #dns: 172.14.0.250
  292. networks:
  293. - anyvision
  294. shm_size: 1024M
  295. volumes:
  296. - /storage/sftp_data:/sftp:rw
  297. - /usr/local/share/ca-certificates/anyvision:/usr/local/share/ca-certificates/anyvision:ro
  298. - /tmp/.X11-unix:/tmp/.X11-unix:rw
  299. - /dev:/dev
  300. - /media:/home/user/media:ro
  301. - /storage/share:/home/user/share:rw
  302. - /etc/localtime:/etc/localtime:ro
  303. #- /home/anyvision:/mnt ### mount your home directory to the container
  304. #- /home/anyvision/Projects/anyvision-dashboard:/home/user/dashboard ### mount your local project directory to the container
  305. extra_hosts:
  306. - nginx-a01.anyvision.local:192.168.0.150
  307. - nginx-a02.anyvision.local:192.168.0.151
  308. # - nginx-a03.anyvision.local:<ip of a03 server>
  309. # - nginx-a04.anyvision.local:<ip of a04 server>
  310. environment:
  311. - DISPLAY=${DISPLAY:-1} ### local display mode - do not forget to run "xhost +" as your local host user (not as root)
  312. - ssl=true
  313. - GATEWAY_HOST=apigateway.anyvision.local
  314. - RUN_AS_USER=user
  315. - ENABLE_CHOWN=false
  316. env_file:
  317. - ../../env/global.env
  318. - ../../env/api-gateway.env
  319. - ../../env/dashboard.env
  320. logging:
  321. options:
  322. max-size: 1g
  323. ipc: host
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement