Skip to content

Commit bf99997

Browse files
authored
📝(doc) update xl packages warning (#985)
So that people know how to use the PUBLISH_AS_MIT variable Signed-off-by: virgile-dev <[email protected]>
1 parent 09d3ff3 commit bf99997

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ Available methods: Helm chart, Nix package
5757

5858
In the works: Docker Compose, YunoHost
5959

60-
⚠️ For the PDF and Docx export Docs relies on XL packages from BlockNote licenced in AGPL-3.0 which are not MIT compatible.
61-
You can perfectly use Docs without these packages by setting the environment variable `PUBLISH_AS_MIT` to true, and that way you'll build an image of the application without the features that are not MIT compatible.
62-
If you run Docs `PUBLISH_AS_MIT` set to false make sure you fulfill your [BlockNote licensing](https://github.com/TypeCellOS/BlockNote/blob/main/packages/xl-pdf-exporter/LICENSE) or [sponsorship](https://www.blocknotejs.org/about#partner-with-us) obligations.
60+
⚠️ For some advanced features (ex: Export as PDF) Docs relies on XL packages from BlockNote. These are licenced under AGPL-3.0 and are not MIT compatible. You can perfectly use Docs without these packages by setting the environment variable `PUBLISH_AS_MIT` to true. That way you'll build an image of the application without the features that are not MIT compatible. Read the [environment variables documentation](/docs/docs/env.md) for more information.
6361

6462
## Getting started 🔧
6563

docs/env.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,36 @@ These are the environment variables you can set for the `impress-backend` contai
107107

108108
These are the environment variables you can set to build the `impress-frontend` image.
109109

110+
Depending on how you are building the front-end application, this variable is used in different ways.
111+
112+
If you want to build the Docker image, this variable is used as an argument in the build command.
113+
114+
Example:
115+
116+
```
117+
docker build -f src/frontend/Dockerfile --target frontend-production --build-arg PUBLISH_AS_MIT=false docs-frontend:latest
118+
```
119+
120+
If you want to build the front-end application using the yarn build command, you can edit the file `src/frontend/apps/impress/.env` with the `NODE_ENV=production` environment variable and modify it. Alternatively, you can use the listed environment variables with the prefix `NEXT_PUBLIC_` (for example, `NEXT_PUBLIC_PUBLISH_AS_MIT=false`).
121+
122+
Example:
123+
124+
```
125+
cd src/frontend/apps/impress
126+
NODE_ENV=production NEXT_PUBLIC_PUBLISH_AS_MIT=false yarn build
127+
```
128+
110129
| Option | Description | default |
111130
| ----------------------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
112131
| API_ORIGIN | backend domain - it uses the current domain if not initialized | |
113132
| SW_DEACTIVATED | To not install the service worker | |
114-
| PUBLISH_AS_MIT | MIT licence does not include the export feature | true |
133+
| PUBLISH_AS_MIT | Removes packages whose licences are incompatible with the MIT licence (see below) | true |
134+
135+
Packages with licences incompatible with the MIT licence:
136+
* `xl-docx-exporter`: [AGPL-3.0](https://github.com/TypeCellOS/BlockNote/blob/main/packages/xl-docx-exporter/LICENSE),
137+
* `xl-pdf-exporter`: [AGPL-3.0](https://github.com/TypeCellOS/BlockNote/blob/main/packages/xl-pdf-exporter/LICENSE)
138+
139+
In `.env.development`, `PUBLISH_AS_MIT` is set to `false`, allowing developers to test Docs with all its features.
140+
141+
⚠️ If you run Docs in production with `PUBLISH_AS_MIT` set to `false` make sure you fulfill your [BlockNote licensing](https://github.com/TypeCellOS/BlockNote/blob/main/packages/xl-pdf-exporter/LICENSE) or [subscription](https://www.blocknotejs.org/about#partner-with-us) obligations.
142+

0 commit comments

Comments
 (0)