Skip to content

Commit

Permalink
Merge pull request SonicCloudOrg#132 from SonicCloudOrg/v1.3.2-beta
Browse files Browse the repository at this point in the history
add_swarm
  • Loading branch information
ZhouYixun authored Feb 27, 2022
2 parents 04e7c67 + 306d102 commit badda97
Showing 1 changed file with 185 additions and 0 deletions.
185 changes: 185 additions & 0 deletions docker-swarm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
version: '3'
services:
sonic-server-eureka:
image: "sonicorg/sonic-server-eureka:v1.3.1-release"
hostname: sonic-server-eureka
environment:
- EUREKA_HOST=sonic-server-eureka # You should checkout sonic-server-eureka env to support more.
networks:
- sonic-network
volumes:
- ./logs/:/logs/
ports:
- "9090:9090"
deploy:
replicas: 1 # one or more.
placement:
constraints:
- node.role == manager
update_config:
parallelism: 1
delay: 2s
restart_policy:
condition: on-failure
delay: 20s
max_attempts: 6
sonic-server-bus:
image: "sonicorg/sonic-server-bus:v1.3.1-release"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
networks:
- sonic-network
volumes:
- ./config:/config
- ./logs/:/logs/
depends_on:
- sonic-server-eureka
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
update_config:
parallelism: 1
delay: 2s
restart_policy:
condition: on-failure
delay: 20s
max_attempts: 6
sonic-server-gateway:
image: "sonicorg/sonic-server-gateway:v1.3.1-release"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
networks:
- sonic-network
volumes:
- ./logs/:/logs/
depends_on:
- sonic-server-bus
- sonic-server-eureka
ports:
- "8094:8094"
deploy:
replicas: 1
placement:
constraints:
- node.role == worker
update_config:
parallelism: 1
delay: 2s
restart_policy:
condition: on-failure
delay: 20s
max_attempts: 6
sonic-server-controller:
image: "sonicorg/sonic-server-controller:v1.3.1-release"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
networks:
- sonic-network
volumes:
- ./logs/:/logs/
depends_on:
- sonic-server-bus
- sonic-server-eureka
- sonic-server-gateway
deploy:
replicas: 2 # one or more.
placement:
constraints:
- node.role == worker
update_config:
parallelism: 1
delay: 2s
restart_policy:
condition: on-failure
delay: 20s
max_attempts: 6
sonic-server-folder:
image: "sonicorg/sonic-server-folder:v1.3.1-release"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
networks:
- sonic-network
volumes:
- ./keepFiles/:/keepFiles/
- ./imageFiles/:/imageFiles/
- ./recordFiles/:/recordFiles/
- ./packageFiles/:/packageFiles/
- ./logs/:/logs/
depends_on:
- sonic-server-bus
- sonic-server-eureka
- sonic-server-gateway
deploy:
replicas: 1 # one or more. You should note that the master and slave machines share folders.
placement:
constraints:
- node.role == manager
update_config:
parallelism: 1
delay: 2s
restart_policy:
condition: on-failure
delay: 20s
max_attempts: 6
sonic-server-task:
image: "sonicorg/sonic-server-task:v1.3.1-release"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
networks:
- sonic-network
volumes:
- ./logs/:/logs/
depends_on:
- sonic-server-bus
- sonic-server-eureka
- sonic-server-gateway
deploy:
replicas: 1 # one or more.
placement:
constraints:
- node.role == worker
update_config:
parallelism: 1
delay: 2s
restart_policy:
condition: on-failure
delay: 20s
max_attempts: 6
sonic-server-transport:
image: "sonicorg/sonic-server-transport:v1.3.1-release"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
networks:
- sonic-network
volumes:
- ./logs/:/logs/
depends_on:
- sonic-server-bus
- sonic-server-eureka
- sonic-server-gateway
ports:
- "8095:8095"
deploy:
replicas: 1 # transport should only one.
placement:
constraints:
- node.role == worker
update_config:
parallelism: 1
delay: 2s
restart_policy:
condition: on-failure
delay: 20s
max_attempts: 6

networks:
sonic-network:
driver: overlay

0 comments on commit badda97

Please sign in to comment.