Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions build/.docker/bundle.bake.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ FROM alpine AS bundle
COPY --from=core ${BUILD_ROOT}/bin/ /build/documentserver/server/FileConverter/bin/
COPY --from=core ${BUILD_ROOT}/tools/ /build/documentserver/server/tools/

COPY --from=server ${BUILD_ROOT}/docservice /build/documentserver/server/DocService/docservice
COPY --from=server ${BUILD_ROOT}/fileconverter /build/documentserver/server/FileConverter/converter
COPY --from=server ${BUILD_ROOT}/metrics /build/documentserver/server/Metrics/metrics
COPY --from=server ${BUILD_ROOT}/adminpanel /build/documentserver/server/AdminPanel/server/adminpanel
COPY --from=server ${BUILD_ROOT}/server /build/documentserver/server/
COPY --from=server ${BUILD_ROOT}/build /build/documentserver/server/AdminPanel/client/build


Expand Down
2 changes: 1 addition & 1 deletion build/.docker/develop.bake.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM finalubuntu AS develop
RUN apt-get update && \
curl -fsSL https://deb.nodesource.com/setup_26.x | bash - && \
apt-get install -yq --no-install-recommends nodejs openjdk-21-jdk wget zip brotli && \
npm install -g @yao-pkg/pkg grunt-cli && \
npm install -g grunt-cli && \
rm -rf /var/lib/apt/lists/*

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
Expand Down
9 changes: 7 additions & 2 deletions build/.docker/orchestrated.bake.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ FROM fedora:43 AS ds-base
APPLICATION_NAME=$COMPANY_NAME_LOW \
DS_VERSION_HASH=$DS_VERSION_HASH \
NODE_ENV=production-linux \
NODE_CONFIG_DIR=/etc/$COMPANY_NAME_LOW/documentserver \
PKG_NATIVE_CACHE_PATH=/tmp/.cache
NODE_CONFIG_DIR=/etc/$COMPANY_NAME_LOW/documentserver

ARG OS_UPDATE_STAMP
RUN dnf -y updateinfo list --security && \
Expand Down Expand Up @@ -164,6 +163,12 @@ FROM ds-base AS docs
COPY --chown=ds:ds --from=ds-service \
/var/www/$COMPANY_NAME_LOW/documentserver/sdkjs \
/var/www/$COMPANY_NAME_LOW/documentserver/sdkjs
COPY --from=ds-service \
/var/www/$COMPANY_NAME_LOW/documentserver/server/node \
/var/www/$COMPANY_NAME_LOW/documentserver/server/node
COPY --from=ds-service \
/var/www/$COMPANY_NAME_LOW/documentserver/server/Common \
/var/www/$COMPANY_NAME_LOW/documentserver/server/Common
COPY --from=ds-service \
/var/www/$COMPANY_NAME_LOW/documentserver/server/DocService \
/var/www/$COMPANY_NAME_LOW/documentserver/server/DocService
Expand Down
2 changes: 1 addition & 1 deletion develop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ The Docker image and dev Makefile handle ARM64 automatically:
- **core**: Uses pre-built upstream binaries on arm64 (V8's bundled clang is x86_64-only)
- **sdkjs**: Closure Compiler falls back to Java mode (`CC_PLATFORM=java`) since the native binary is x86_64-only
- **web-apps**: Skips imagemin on arm64 (native binaries are x86_64-only)
- **server**: `pkg` builds native arm64 binaries
- **server**: runs on the container's Node, nothing architecture-specific to build

A multi-arch `:latest-dev` image (amd64 + arm64) is published to GHCR nightly, built from `main` with all submodules at their latest commit, so ARM64 users can `make pull` like everyone else — `make build` is only needed for offline work or to rebuild the image itself.

Expand Down
22 changes: 11 additions & 11 deletions develop/setup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ all: web-apps sdkjs core server #core/wasm
# ARM64 platform accommodations
IS_ARM64 := $(filter aarch64,$(shell uname -m))
CC_PLATFORM ?= $(if $(IS_ARM64),java,$(shell $(EO_DEV)/sdkjs/build/node_modules/google-closure-compiler-linux/compiler --version >/dev/null 2>&1 && echo "native,java" || echo "java"))
PKG_TARGET := linux-$(if $(IS_ARM64),arm64,x64)
CORE_FLAGS := -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG="-g -O0" -DCMAKE_C_FLAGS_DEBUG="-g -O0"
SERVER_FLAGS :=
SDKJS_FLAGS :=
Expand Down Expand Up @@ -180,35 +179,36 @@ core/wasm: build-font build-spell build-zlib build-hash build-draw
## SERVER BUILD
## -----------------

# Copies all services (sources, node_modules, node) into the installed tree,
# then restarts the one that was asked for.
define build_server
@echo "Building $(1) with flags $(CFLAGS)"
cd $(1) && \
npm install && \
pkg . -t $(PKG_TARGET) --node-options="--max_old_space_size=4096" $(CFLAGS) -o $(2) && \
supervisorctl restart $(3)
$(EO_DEV)/server/.docker/install-runtime.sh $(EO_ROOT)/server && \
supervisorctl restart $(1)
endef


server: server/common server/docservice server/converter server/metrics server/adminp

server/common:
for d in Common DocService FileConverter Metrics AdminPanel/server; do \
(cd $(EO_DEV)/server/$$d && npm install) || exit 1; \
done
cd $(EO_DEV)/server/Common && \
npm install && \
sed "s|\(const buildVersion = \).*|\1'${PRODUCT_VERSION}';|" -i sources/commondefines.js

server/docservice: server/common
$(call build_server,$(EO_DEV)/server/DocService,${EO_ROOT}/server/DocService/docservice, docservice)
$(call build_server,docservice)

server/converter: server/common
$(call build_server,$(EO_DEV)/server/FileConverter,${EO_ROOT}/server/FileConverter/converter, converter)
$(call build_server,converter)

server/metrics: server/common
$(call build_server,$(EO_DEV)/server/Metrics,${EO_ROOT}/server/Metrics/metrics, metrics)
$(call build_server,metrics)

server/adminp: server/common server/adminp/cli server/adminp/srv

server/adminp/srv: server/common
$(call build_server,$(EO_DEV)/server/AdminPanel/server,${EO_ROOT}/server/AdminPanel/server/adminpanel, adminpanel)
$(call build_server,adminpanel)

server/adminp/cli: server/common
@echo "Building server/adminpanel/client with flags $(CFLAGS)"
Expand Down
Loading