Are there any guide on how to build the DocSpace from source?
OS: Windows
Are there any guide on how to build the DocSpace from source?
OS: Windows
hi @taran
Unfortunately, not yet. I canāt even tell you the timing.
Iām trying to figure it out myself.
I want to make some Front End changes.
So the code I have to modify is āpackages/clientā.
Inside there I see āDockerfileā.
It seems to be ancient though:
FROM node:12
WORKDIR /usr/src/app
COPY package.json ./
COPY yarn.lock ./
RUN yarn install
COPY . .
RUN yarn build
EXPOSE 8080
CMD [ "yarn", "build:start" ]
Itās set to node:12, but requires node 18, also yarn.lock file is not there.
I also see ābuild:startā command, but there is no such command in package.json.
When I update node to node:18 and comment out the yarn.lock line,
when I:
docker build --tag client .
I get the following error:
=> ERROR [6/6] RUN yarn build 1.1s
------
> [6/6] RUN yarn build:
0.690 yarn run v1.22.19
0.725 $ yarn build:translations && NODE_OPTIONS=--openssl-legacy-provider webpack --mode production
0.968 $ node scripts/buildTranslations.js
1.020 node:internal/modules/cjs/loader:1080
1.020 throw err;
1.020 ^
1.020
1.020 Error: Cannot find module '@docspace/common/utils/beforeBuild'
1.020 Require stack:
1.020 - /usr/src/app/scripts/buildTranslations.js
1.020 at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
1.020 at Module._load (node:internal/modules/cjs/loader:922:27)
1.020 at Module.require (node:internal/modules/cjs/loader:1143:19)
1.020 at require (node:internal/modules/cjs/helpers:121:18)
1.020 at Object.<anonymous> (/usr/src/app/scripts/buildTranslations.js:2:21)
1.020 at Module._compile (node:internal/modules/cjs/loader:1256:14)
1.020 at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
1.020 at Module.load (node:internal/modules/cjs/loader:1119:32)
1.020 at Module._load (node:internal/modules/cjs/loader:960:12)
1.020 at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
1.020 code: 'MODULE_NOT_FOUND',
1.020 requireStack: [ '/usr/src/app/scripts/buildTranslations.js' ]
1.020 }
1.020
1.020 Node.js v18.17.1
1.034 error Command failed with exit code 1.
1.035 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
1.065 error Command failed with exit code 1.
1.066 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
Dockerfile:11
--------------------
9 | COPY . .
10 |
11 | >>> RUN yarn build
12 |
13 | EXPOSE 8080
--------------------
ERROR: failed to solve: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1
Is there a latest version of this Dockerfile I can get somewhere?
Please note that we do not provide support for source code changes on the forum ĀÆ\__(ć)_/ĀÆ
If you highly interested in that, please try to ask my colleagues on GitHib: ONLYOFFICE Ā· GitHub
oops
Thanks, @taran, weāll fix it.
If you copied the repository, change the installation_type in the file: docspace/build/install/docker/.env
INSTALLATION_TYPE=ENTERPRISE
>> INSTALLATION_TYPE=COMMUNITY
or when launching the yml file add:
INSTALLATION_TYPE=COMMUNITY docker-compose ?.yml up -d
Thanks Nikolas,
with your tip + few more modifications, I was able to compile everything and get it to run.