Skip to content

Commit 1851508

Browse files
committed
feat: add ssc-server conf
1 parent ae01300 commit 1851508

4 files changed

Lines changed: 35 additions & 4 deletions

File tree

docker-compose/.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,6 @@ CORS_ALLOW_ORIGINS='["*"]'
131131
# export use permission
132132
PERMISSION_BASED_EXPORT_ENABLED=true
133133

134+
# enabled ssc server
135+
SSC_SERVER_ENABLED=false
136+

docker-compose/configs/config.yaml.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ service:
5151
apply:
5252
addr: collaboration-envoy:10000
5353
timeout: 10s
54+
ssc:
55+
addr: "ssc-server:5005"
56+
timeout: 10s
5457
admin: []
5558
extra:
5659
celldataMaxSize: 10485760 # 10M bytes

docker-compose/docker-compose.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
container_name: univer-lb
55
image: nginx:alpine-slim
66
ports:
7-
- ${HOST_NGINX_PORT}:8000
7+
- ${HOST_NGINX_PORT}:8000
88
networks:
99
- univer
1010
depends_on:
@@ -19,7 +19,7 @@ services:
1919
- 8000
2020
- 9000
2121
environment:
22-
- NO_PROXY=127.0.0.1,localhost,${DOCKER_NETWORK_SUBNET},univer-temporal,collaboration-envoy,univer-minio,univer-demo-usip
22+
- NO_PROXY=127.0.0.1,localhost,${DOCKER_NETWORK_SUBNET},univer-temporal,collaboration-envoy,univer-minio,univer-demo-usip,ssc-server
2323
- SERVICE_NAME=Universer
2424
- SERVICE_VERSION=${UNIVERSER_VERSION}
2525
volumes:
@@ -79,6 +79,24 @@ services:
7979
limits:
8080
memory: ${COLLABORATION_SERVER_MEMORY_LIMIT}M
8181

82+
ssc-server:
83+
restart: always
84+
image: univer-acr-registry.cn-shenzhen.cr.aliyuncs.com/release/univer-collaboration:${COLLABORATION_SERVER_VERSION}
85+
environment:
86+
- URL_OF_APPLY_SERVICE=0.0.0.0:5005
87+
- URL_OF_UNIVERSER_SERVICE=universer:8000
88+
- URL_OF_SNAPSHOT_SERVICE=universer:9000
89+
- no_proxy=127.0.0.1,localhost,${DOCKER_NETWORK_SUBNET},universer
90+
expose:
91+
- 5005
92+
networks:
93+
- univer
94+
labels:
95+
- com.univer.app=ssc-server
96+
profiles:
97+
- ssc
98+
command: ["pnpm", "start:ssc"]
99+
82100
univer-temporal:
83101
privileged: true
84102
user: "0"

docker-compose/run.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ gen_profiles() {
160160
if [ "$DISABLE_UNIVER_S3" != "true" ]; then
161161
profiles="${profiles} --profile s3 "
162162
fi
163-
163+
if [ "$SSC_SERVER_ENABLED" == "true" ]; then
164+
profiles="${profiles} --profile ssc "
165+
fi
164166
echo ${profiles}
165167
}
166168

@@ -188,10 +190,15 @@ start() {
188190
env_param=$(gen_env_param)
189191

190192
$DOCKER_COMPOSE -f $INFRA_COMPOSE_FILE $env_param $profiles up -d
191-
193+
192194
wait_db_init_success
193195
$DOCKER_COMPOSE -f $COMPOSE_FILE $env_param up -d
194196

197+
if [ "$SSC_SERVER_ENABLED" == "true" ]; then
198+
sleep 1
199+
$DOCKER_COMPOSE -f $COMPOSE_FILE $env_param $profiles up -d
200+
fi
201+
195202
if [ "$ENABLE_UNIVER_OBSERVABILITY" == "true" ]; then
196203
sleep 1
197204
$DOCKER_COMPOSE -f $OBSERVE_COMPOSE_FILE $env_param $profiles up -d

0 commit comments

Comments
 (0)