-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
25 lines (18 loc) · 1.03 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM node:20.16-bullseye
ENV DOCSERVER_NETWORK_NAME=''
ENV DOCS_PORT='8008'
ENV PORT=80
ARG BUILD_BRANCH=master
RUN git clone --depth=1 --recursive --shallow-submodules -b $BUILD_BRANCH https://github.com/ONLYOFFICE/document-server-integration.git
WORKDIR /document-server-integration/web/documentserver-example/nodejs/
RUN apt-get update && apt-get install -y jq moreutils
RUN jq '.server.enableForgotten = true' config/default.json | sponge config/default.json && \
jq '.server.maxFileSize = 107374182400' config/default.json | sponge config/default.json && \
jq --arg name "$DOCSERVER_NETWORK_NAME" \
--arg port "$DOCS_PORT" \
'.server.siteUrl = "http://" + $name + ":" + $port + "/"' config/default.json | sponge config/default.json && \
jq --arg port "$PORT" '.server.port = $port' config/default.json | sponge config/default.json && \
jq '.server.maxFileSize = 107374182400' config/production-linux.json | sponge config/production-linux.json
RUN npm install
ENV NODE_CONFIG_DIR="./config"
CMD ["node", "bin/www"]