Skip to content

Commit

Permalink
feature: node example config via sed
Browse files Browse the repository at this point in the history
  • Loading branch information
askonev committed Jun 27, 2024
1 parent d8b00f3 commit b23a08b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
FROM node:10-buster
FROM node:14.21.3-buster

ARG build_branch=master

RUN git clone --depth=1 --recursive --shallow-submodules -b $build_branch https://github.com/ONLYOFFICE/document-server-integration.git
ENV DOCS_LAN='documentserver'
ENV DOCS_PORT='8008'

ENV PORT=80

ARG BUILD_BRANCH=release/v1.9.0

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 sed -i "s/documentserver/$LAN:$DOCS_PORT/" config/default.json
RUN sed -i "s/\"port\".*,/\"port\"\: ${PORT},/" config/default.json

RUN npm install
ENV NODE_CONFIG_DIR="./config"

Expand Down
5 changes: 1 addition & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.7"
services:
documentserver:
image: onlyoffice/documentserver-ee
Expand All @@ -9,9 +8,7 @@ services:
environment:
- JWT_ENABLED=false
- ALLOW_PRIVATE_IP_ADDRESS=true
ds-test-example:
example:
build: .
ports:
- "80:80"
volumes:
- ./local.json:/document-server-integration/web/documentserver-example/nodejs/config/local.json

0 comments on commit b23a08b

Please sign in to comment.