forked from SonicCloudOrg/sonic-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request SonicCloudOrg#132 from SonicCloudOrg/v1.3.2-beta
add_swarm
- Loading branch information
Showing
1 changed file
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |