Skip to content

Commit df9d0c4

Browse files
Merge branch 'develop' into feature/langflow
# Conflicts: # config/nginx/onlyoffice.conf
2 parents 03e1a15 + a2381f5 commit df9d0c4

33 files changed

+111
-47
lines changed

build.backend.docker.py

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def check_image(image_name):
4848
# sys.exit(1)
4949

5050
doceditor = f"{local_ip}:5013"
51+
sdk = f"{local_ip}:5099"
5152
login = f"{local_ip}:5011"
5253
client = f"{local_ip}:5001"
5354
identity_auth = f"{local_ip}:8080"
@@ -121,6 +122,7 @@ def check_image(image_name):
121122

122123
print()
123124
print(f"SERVICE_DOCEDITOR: {doceditor}")
125+
print(f"SERVICE_SDK: {sdk}")
124126
print(f"SERVICE_LOGIN: {login}")
125127
print(f"SERVICE_CLIENT: {client}")
126128
print(f"SERVICE_MANAGEMENT: {management}")
@@ -319,6 +321,7 @@ def check_image(image_name):
319321
os.environ["Baseimage_Proxy_Run"] = "onlyoffice/4testing-docspace-proxy-runtime:" + proxy_version
320322
os.environ["DOCUMENT_SERVER_IMAGE_NAME"] = document_server_image_name
321323
os.environ["SERVICE_DOCEDITOR"] = doceditor
324+
os.environ["SERVICE_SDK"] = sdk
322325
os.environ["SERVICE_LOGIN"] = login
323326
os.environ["SERVICE_MANAGEMENT"] = management
324327
os.environ["SERVICE_CLIENT"] = client
@@ -349,6 +352,7 @@ def check_image(image_name):
349352

350353
print()
351354
print(f"SERVICE_DOCEDITOR: {doceditor}")
355+
print(f"SERVICE_SDK: {sdk}")
352356
print(f"SERVICE_LOGIN: {login}")
353357
print(f"SERVICE_CLIENT: {client}")
354358
print(f"SERVICE_MANAGEMENT: {management}")

build.backend.dotnet.sh

+2-8
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,10 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
88
cd "$SCRIPT_DIR"
99

1010
if [ $? -eq 0 ]; then
11-
bash start/stop.sh nopause
11+
bash start/stop.sh
1212
dotnet build ../server/asc.web.slnf /fl1 "/flp1:logfile=asc.web.log;verbosity=normal"
1313
fi
1414

1515
echo
1616

17-
bash start/stop.sh nopause
18-
19-
echo
20-
21-
if [ "$1" != "nopause" ]; then
22-
read -p "Press Enter to continue..."
23-
fi
17+
bash start/start.sh

config/nginx/onlyoffice.conf

+22
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,28 @@ server {
241241
proxy_pass http://127.0.0.1:7860;
242242
proxy_redirect off;
243243
}
244+
245+
location /sdk {
246+
proxy_pass http://127.0.0.1:5099;
247+
proxy_redirect off;
248+
249+
add_header Cache-Control '';
250+
251+
252+
location ~* /_next/public/images/(.*)$ {
253+
try_files /images/$1 /index.html =404;
254+
}
255+
256+
location ~*/_next/static/(chunks|css|media)/(.*)$ {
257+
root /var/www/build/sdk/static;
258+
try_files /$1/$2 @wrong_sdk_chunk;
259+
}
260+
}
261+
262+
location @wrong_sdk_chunk {
263+
proxy_pass http://127.0.0.1:5099;
264+
proxy_redirect off;
265+
}
244266

245267
location /doceditor {
246268
proxy_pass http://127.0.0.1:5013;

install/common/build-frontend.sh

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ CLIENT_PACKAGES+=("@docspace/client")
7070
CLIENT_PACKAGES+=("@docspace/login")
7171
CLIENT_PACKAGES+=("@docspace/doceditor")
7272
CLIENT_PACKAGES+=("@docspace/management")
73+
CLIENT_PACKAGES+=("@docspace/sdk")
7374

7475
export TS_ERRORS_IGNORE=true
7576
for PKG in ${CLIENT_PACKAGES[@]}; do

install/docker/.env

+2
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
PROXY_HOST=${CONTAINER_PREFIX}proxy
122122
ROUTER_HOST=${CONTAINER_PREFIX}router
123123
DOCEDITOR_HOST=${CONTAINER_PREFIX}doceditor
124+
SDK_HOST=${CONTAINER_PREFIX}sdk
124125
LOGIN_HOST=${CONTAINER_PREFIX}login
125126
MANAGEMENT_HOST={CONTAINER_PREFIX}management
126127
HELTHCHECKS_HOST=${CONTAINER_PREFIX}healthchecks
@@ -160,6 +161,7 @@
160161
SERVICE_SSOAUTH=${SSOAUTH_HOST}:${SERVICE_PORT}
161162
SERVICE_TELEGRAMREPORTS=${TELEGRAMREPORTS_HOST}:${SERVICE_PORT}
162163
SERVICE_DOCEDITOR=${DOCEDITOR_HOST}:5013
164+
SERVICE_SDK=${SDK_HOST}:${SERVICE_PORT}
163165
SERVICE_LOGIN=${LOGIN_HOST}:5011
164166
SERVICE_MANAGEMENT={MANAGEMENT_HOST}:${SERVICE_PORT}
165167
SERVICE_HELTHCHECKS=${HELTHCHECKS_HOST}:${SERVICE_PORT}

install/docker/Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ RUN chown nginx:nginx /etc/nginx/* -R && \
175175
sed -i 's/127.0.0.1:9899/$service_socket/' /etc/nginx/conf.d/onlyoffice.conf && \
176176
sed -i 's/127.0.0.1:9834/$service_sso/' /etc/nginx/conf.d/onlyoffice.conf && \
177177
sed -i 's/127.0.0.1:5013/$service_doceditor/' /etc/nginx/conf.d/onlyoffice.conf && \
178+
sed -i 's/127.0.0.1:5099/$service_sdk/' /etc/nginx/conf.d/onlyoffice.conf && \
178179
sed -i 's/127.0.0.1:5011/$service_login/' /etc/nginx/conf.d/onlyoffice.conf && \
179180
sed -i 's/127.0.0.1:9090/$service_identity_api/' /etc/nginx/conf.d/onlyoffice.conf && \
180181
sed -i 's/127.0.0.1:8080/$service_identity/' /etc/nginx/conf.d/onlyoffice.conf && \
@@ -186,6 +187,16 @@ RUN chown nginx:nginx /etc/nginx/* -R && \
186187
sed -i '/client_body_temp_path/ i \ \ \ \ $MAP_HASH_BUCKET_SIZE' /etc/nginx/nginx.conf.template && \
187188
sed -i 's/\(worker_connections\).*;/\1 $COUNT_WORKER_CONNECTIONS;/' /etc/nginx/nginx.conf.template
188189

190+
191+
## Sdk ##
192+
FROM noderun AS sdk
193+
WORKDIR ${BUILD_PATH}/products/ASC.Sdk/sdk
194+
195+
COPY --from=base --chown=onlyoffice:onlyoffice ${SRC_PATH}/buildtools/install/docker/docker-entrypoint.py .
196+
COPY --from=base --chown=onlyoffice:onlyoffice ${SRC_PATH}/buildtools/deploy/sdk/ .
197+
198+
CMD ["server.js", "ASC.Sdk"]
199+
189200
## Doceditor ##
190201
FROM noderun as doceditor
191202
WORKDIR ${BUILD_PATH}/services/ASC.Editors/editor

install/docker/Dockerfile.app

+14
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ node common/scripts/before-build.js
9191
CLIENT_PACKAGES+=("@docspace/client")
9292
CLIENT_PACKAGES+=("@docspace/login")
9393
CLIENT_PACKAGES+=("@docspace/doceditor")
94+
CLIENT_PACKAGES+=("@docspace/sdk")
9495
CLIENT_PACKAGES+=("@docspace/management")
9596

9697
for PKG in ${CLIENT_PACKAGES[@]}; do
@@ -246,6 +247,9 @@ RUN echo "--- install runtime node.22 ---" && \
246247
COPY --from=build-node --chown=onlyoffice:onlyoffice ${SRC_PATH}/publish/web/login/.next/static/chunks ${BUILD_PATH}/build/login/static/chunks
247248
COPY --from=build-node --chown=onlyoffice:onlyoffice ${SRC_PATH}/publish/web/login/.next/static/css ${BUILD_PATH}/build/login/static/css
248249
COPY --from=build-node --chown=onlyoffice:onlyoffice ${SRC_PATH}/publish/web/login/.next/static/media ${BUILD_PATH}/build/login/static/media
250+
COPY --from=build-node --chown=onlyoffice:onlyoffice ${SRC_PATH}/publish/web/sdk/.next/static/chunks ${BUILD_PATH}/build/sdk/static/chunks
251+
COPY --from=build-node --chown=onlyoffice:onlyoffice ${SRC_PATH}/publish/web/sdk/.next/static/css ${BUILD_PATH}/build/sdk/static/css
252+
COPY --from=build-node --chown=onlyoffice:onlyoffice ${SRC_PATH}/publish/web/sdk/.next/static/media ${BUILD_PATH}/build/sdk/static/media
249253
COPY --from=build-node --chown=onlyoffice:onlyoffice ${SRC_PATH}/publish/web/management ${BUILD_PATH}/management
250254
COPY --from=src --chown=onlyoffice:onlyoffice /etc/nginx/conf.d /etc/nginx/conf.d
251255
COPY --from=src --chown=onlyoffice:onlyoffice /etc/nginx/includes /etc/nginx/includes
@@ -269,6 +273,7 @@ RUN echo "--- install runtime node.22 ---" && \
269273
sed -i 's/127.0.0.1:9899/$service_socket/' /etc/nginx/conf.d/onlyoffice.conf && \
270274
sed -i 's/127.0.0.1:9834/$service_sso/' /etc/nginx/conf.d/onlyoffice.conf && \
271275
sed -i 's/127.0.0.1:5013/$service_doceditor/' /etc/nginx/conf.d/onlyoffice.conf && \
276+
sed -i 's/127.0.0.1:5099/$service_sdk/' /etc/nginx/conf.d/onlyoffice.conf && \
272277
sed -i 's/127.0.0.1:5011/$service_login/' /etc/nginx/conf.d/onlyoffice.conf && \
273278
sed -i 's/127.0.0.1:9090/$service_identity_api/' /etc/nginx/conf.d/onlyoffice.conf && \
274279
sed -i 's/127.0.0.1:8080/$service_identity/' /etc/nginx/conf.d/onlyoffice.conf && \
@@ -288,6 +293,15 @@ RUN echo "--- install runtime node.22 ---" && \
288293

289294
CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"]
290295

296+
## Sdk ##
297+
FROM noderun AS sdk
298+
WORKDIR ${BUILD_PATH}/products/ASC.Sdk/sdk
299+
300+
COPY --from=src --chown=onlyoffice:onlyoffice ${SRC_PATH}/buildtools/install/docker/docker-entrypoint.py ./docker-entrypoint.py
301+
COPY --from=build-node --chown=onlyoffice:onlyoffice ${SRC_PATH}/publish/web/sdk/ .
302+
303+
CMD ["server.js", "ASC.Sdk"]
304+
291305
## Doceditor ##
292306
FROM noderun AS doceditor
293307
WORKDIR ${BUILD_PATH}/products/ASC.Editors/editor

install/docker/Dockerfile.runtime

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ RUN chown onlyoffice:onlyoffice /etc/nginx/* -R && \
121121
sed -i 's/127.0.0.1:9899/$service_socket/' /etc/nginx/conf.d/onlyoffice.conf && \
122122
sed -i 's/127.0.0.1:9834/$service_sso/' /etc/nginx/conf.d/onlyoffice.conf && \
123123
sed -i 's/127.0.0.1:5013/$service_doceditor/' /etc/nginx/conf.d/onlyoffice.conf && \
124+
sed -i 's/127.0.0.1:5099/$service_sdk/' /etc/nginx/conf.d/onlyoffice.conf && \
124125
sed -i 's/127.0.0.1:5011/$service_login/' /etc/nginx/conf.d/onlyoffice.conf && \
125126
sed -i 's/127.0.0.1:9090/$service_identity_api/' /etc/nginx/conf.d/onlyoffice.conf && \
126127
sed -i 's/127.0.0.1:8080/$service_identity/' /etc/nginx/conf.d/onlyoffice.conf && \

install/docker/build.yml

+7
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ services:
111111
target: doceditor
112112
image: "${REPO}/${DOCKER_IMAGE_PREFIX}-doceditor:${DOCKER_TAG}"
113113

114+
onlyoffice-sdk:
115+
build:
116+
context: ./
117+
dockerfile: "${DOCKERFILE}"
118+
target: sdk
119+
image: "${REPO}/${DOCKER_IMAGE_PREFIX}-sdk:${DOCKER_TAG}"
120+
114121
onlyoffice-login:
115122
build:
116123
context: ./

install/docker/config/docspace-ssl-setup

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ case $1 in
133133
if grep -q '${CERTIFICATE_PATH}:' ${DOCKERCOMPOSE}/docspace.yml; then
134134
sed -i '/USE_UNAUTHORIZED_STORAGE/d' ${DOCKERCOMPOSE}/ds.yml
135135
sed -i '/${CERTIFICATE_PATH}:/d' ${DOCKERCOMPOSE}/docspace.yml ${DOCKERCOMPOSE}/ds.yml
136-
docker-compose -f ${DOCKERCOMPOSE}/docspace.yml up --force-recreate -d onlyoffice-doceditor onlyoffice-login onlyoffice-socket onlyoffice-ssoauth
136+
docker-compose -f ${DOCKERCOMPOSE}/docspace.yml up --force-recreate -d onlyoffice-doceditor onlyoffice-sdk onlyoffice-login onlyoffice-socket onlyoffice-ssoauth
137137
docker-compose -f ${DOCKERCOMPOSE}/ds.yml up --force-recreate -d
138138
fi
139139

install/docker/config/nginx/templates/upstream.conf.template

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ map $SERVICE_DOCEDITOR $service_doceditor {
1212
default $SERVICE_DOCEDITOR;
1313
}
1414

15+
map $SERVICE_SDK $service_sdk {
16+
volatile;
17+
"" 127.0.0.1:5099;
18+
default $SERVICE_SDK;
19+
}
20+
1521
map $SERVICE_MANAGEMENT $service_management {
1622
volatile;
1723
"" 127.0.0.1:5015;

install/docker/docspace.profiles.yml

+7
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,12 @@ services:
232232
expose:
233233
- "5013"
234234

235+
onlyoffice-sdk:
236+
<<: [*x-service-base, *x-profiles-frontend]
237+
image: "${REPO}/${DOCKER_IMAGE_PREFIX}-sdk:${DOCKER_TAG}"
238+
container_name: ${SDK_HOST}
239+
restart: always
240+
235241
onlyoffice-login:
236242
<<: [*x-service-base, *x-profiles-frontend]
237243
image: "${REPO}/${DOCKER_IMAGE_PREFIX}-login:${DOCKER_TAG}"
@@ -272,6 +278,7 @@ services:
272278
- SERVICE_SSOAUTH=${SERVICE_SSOAUTH}
273279
- SERVICE_TELEGRAMREPORTS=${SERVICE_TELEGRAMREPORTS}
274280
- SERVICE_DOCEDITOR=${SERVICE_DOCEDITOR}
281+
- SERVICE_SDK=${SERVICE_SDK}
275282
- SERVICE_LOGIN=${SERVICE_LOGIN}
276283
- SERVICE_ONLYFLOW_FRONTEND=${SERVICE_ONLYFLOW_FRONTEND}
277284
- SERVICE_ONLYFLOW_BACKEND=${SERVICE_ONLYFLOW_BACKEND}

install/docker/docspace.yml

+10
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,14 @@ services:
171171
healthcheck:
172172
<<: *x-healthcheck
173173
test: curl --fail http://${SERVICE_DOCEDITOR}/doceditor/health || exit 1
174+
175+
onlyoffice-sdk:
176+
<<: *x-service-base
177+
image: "${HUB}${REPO}/${DOCKER_IMAGE_PREFIX}-sdk:${DOCKER_TAG}"
178+
container_name: ${SDK_HOST}
179+
healthcheck:
180+
<<: *x-healthcheck
181+
test: curl --fail http://${SERVICE_SDK}/sdk/health || exit 1
174182

175183
onlyoffice-login:
176184
<<: *x-service-base
@@ -208,6 +216,7 @@ services:
208216
- onlyoffice-studio
209217
- onlyoffice-ssoauth
210218
- onlyoffice-doceditor
219+
- onlyoffice-sdk
211220
- onlyoffice-login
212221
environment:
213222
- SERVICE_BACKUP=${SERVICE_BACKUP}
@@ -225,6 +234,7 @@ services:
225234
- SERVICE_STUDIO=${SERVICE_STUDIO}
226235
- SERVICE_SSOAUTH=${SERVICE_SSOAUTH}
227236
- SERVICE_DOCEDITOR=${SERVICE_DOCEDITOR}
237+
- SERVICE_SDK=${SERVICE_SDK}
228238
- SERVICE_LOGIN=${SERVICE_LOGIN}
229239
- SERVICE_HELTHCHECKS=${SERVICE_HELTHCHECKS}
230240
- SERVICE_ONLYFLOW_FRONTEND=${ONLYFLOW_HOST}-frontend:${ONLYFLOW_FRONTEND_PORT}

run/macos/com.onlyoffice.apisystem.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</array>
2222

2323
<key>RunAtLoad</key>
24-
<true/>
24+
<false/>
2525

2626
<key>StandardErrorPath</key>
2727
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.apisystem.err</string>

run/macos/com.onlyoffice.backup.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</array>
2222

2323
<key>RunAtLoad</key>
24-
<true/>
24+
<false/>
2525

2626
<key>KeepAlive</key>
2727
<true/>

run/macos/com.onlyoffice.backupbackgroundtasks.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</array>
2323

2424
<key>RunAtLoad</key>
25-
<true/>
25+
<false/>
2626

2727
<key>StandardErrorPath</key>
2828
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.backupbackgroundtasks.err</string>

run/macos/com.onlyoffice.clearevents.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</array>
2222

2323
<key>RunAtLoad</key>
24-
<true/>
24+
<false/>
2525

2626
<key>StandardErrorPath</key>
2727
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.clearevents.err</string>

run/macos/com.onlyoffice.editors.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</array>
1616

1717
<key>RunAtLoad</key>
18-
<true/>
18+
<false/>
1919

2020
<key>StandardErrorPath</key>
2121
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.editors.err</string>

run/macos/com.onlyoffice.fileserver.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</array>
2222

2323
<key>RunAtLoad</key>
24-
<true/>
24+
<false/>
2525

2626
<key>StandardErrorPath</key>
2727
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.fileserver.err</string>

run/macos/com.onlyoffice.fileservice.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</array>
2323

2424
<key>RunAtLoad</key>
25-
<true/>
25+
<false/>
2626

2727
<key>StandardErrorPath</key>
2828
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.fileservice.err</string>

run/macos/com.onlyoffice.identityapi.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</dict>
2525

2626
<key>RunAtLoad</key>
27-
<true/>
27+
<false/>
2828

2929
<key>StandardErrorPath</key>
3030
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.identityapi.err</string>

run/macos/com.onlyoffice.identitymigration.plist

+3-10
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</dict>
2525

2626
<key>RunAtLoad</key>
27-
<true/>
27+
<false/>
2828

2929
<key>StandardErrorPath</key>
3030
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.identitymigration.err</string>
@@ -33,14 +33,7 @@
3333
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.identitymigration.log</string>
3434

3535
<key>KeepAlive</key>
36-
<dict>
37-
<key>SuccessfulExit</key>
38-
<false/>
39-
<key>Crashed</key>
40-
<true/>
41-
</dict>
42-
43-
<key>ThrottleInterval</key>
44-
<integer>5</integer>
36+
<true/>
37+
4538
</dict>
4639
</plist>

run/macos/com.onlyoffice.identityservice.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</dict>
2727

2828
<key>RunAtLoad</key>
29-
<true/>
29+
<false/>
3030

3131
<key>StandardErrorPath</key>
3232
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.identityservice.err</string>

run/macos/com.onlyoffice.login.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</array>
1616

1717
<key>RunAtLoad</key>
18-
<true/>
18+
<false/>
1919

2020
<key>StandardErrorPath</key>
2121
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.login.err</string>

run/macos/com.onlyoffice.notifyservice.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</array>
2323

2424
<key>RunAtLoad</key>
25-
<true/>
25+
<false/>
2626

2727
<key>StandardErrorPath</key>
2828
<string>${DOCSPACE_ROOT}/Logs/com.onlyoffice.notifyservice.err</string>

0 commit comments

Comments
 (0)