41 Commits
Author SHA1 Message Date
24f95cadc3 perf: Reduce server memory usage and add container memory best practices (#13042)
* Reduce server memory usage and add container memory best practices

Profiling a full-service boot showed ~300MB RSS per service process, much
of it client-only dependencies pulled into the server module graph, and no
heap limits applied in containers:

- Import date-fns locales individually rather than via the locale index,
  which loaded all ~90 locales into every process
- Load @sentry/react dynamically in insertFiles so the browser Sentry SDK
  stays out of the server-side editor graph
- Replace class-validator isHexColor with the existing validateColorHex
  in the Highlight mark
- Extract icon names into a standalone IconNames module so server-side
  schema validation no longer imports Font Awesome icon packs, with a
  test to keep it in sync with IconLibrary
- Require S3Storage lazily so the AWS SDK and native CRT binding are only
  loaded when S3 file storage is configured
- Default each forked service process to a V8 heap limit derived from the
  cgroup memory constraint, preventing several processes from together
  committing more memory than the container allows
- Cap glibc malloc arenas in the Docker image to reduce resident memory
  fragmentation in multi-threaded processes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YMX5ReGHyxrR4ZE5ZbaXa

* Require both file storage backends lazily for consistency

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YMX5ReGHyxrR4ZE5ZbaXa

* Load AWS SDK via dynamic imports compatible with test environment

Requiring the storage TypeScript modules lazily broke under Vitest, which
cannot resolve require() of source files and does not apply vi.mock to
bare requires. Move the laziness into S3Storage instead: the module is
imported statically, and the AWS SDK packages are loaded with dynamic
imports on first use, including deferred creation of the S3 client.

Also address review feedback: handle rejection of the dynamic Sentry
import, and warn when the minimum per-process heap limit exceeds the
memory budget of the container.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YMX5ReGHyxrR4ZE5ZbaXa

* Consolidate S3 SDK loading into a single lazy accessor

The commands are loaded together with the client in getS3() rather than
as separate dynamic imports per method. The global S3Client test mock is
now a class, as a mock function is not constructable when reached through
a dynamic import.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YMX5ReGHyxrR4ZE5ZbaXa

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-18 18:34:32 -04:00
Tom MoorandGitHub ebaaedb10e Update to Node 26 LTS (#12753) 2026-06-21 15:31:00 -04:00
4bd5585f8c fix: Update Node.js to 24.16.0 (#12448)
Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>
2026-05-25 08:34:10 -04:00
06d5969099 fix: Update Node.js to 24.15.0 (#12120)
Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>
2026-04-20 06:19:11 -04:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>tommoorTom Moor
c4479e257e chore: upgrade Node.js to 24.14.1 (LTS) (#11918)
* Initial plan

* chore: upgrade Node.js base image from 22.21.0 to 24.14.1 (LTS)

* chore: include node version in node_modules cache keys

* Add canary build for docker changes

* fix: Try docker driver

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2026-04-01 17:47:01 -04:00
Tom MoorandGitHub 9c3e896385 Remove yarn usage in prod (#11045) 2026-01-02 21:41:39 -05:00
Tom MoorandGitHub c3b91a8441 fix: Docker build with Yarn 4 (#11031)
* Add missing corepack

* Serialize plugin gen to protect memory

* fix: Missing Yarn4 config

* Prune dev deps
2025-12-31 22:29:25 -05:00
Tom MoorandGitHub 5035ad2027 fix: Pin to node 22.21.0 (#10496) 2025-10-28 08:13:28 -04:00
Tobias GenanntandGitHub 6f8f25b0d1 Small improvements to the Docker build (#10204)
- Use same Node.js version in build and runner image
- Reduce size of the image by applying the chown directly in the COPY
2025-10-05 16:29:37 -04:00
codegen-sh[bot]andGitHub 2a962efe57 feat: upgrade Node.js support to include Node 22 (#9503) 2025-06-28 10:47:14 -04:00
Tom MoorandGitHub 016c8c802c Finalize moving docker publish to GH actions (#8927) 2025-04-10 18:10:10 -07:00
Tom Moor 363c416873 fix: Docker HEALTHCHECK does not work if PORT is not explicity defined in env
closes #7547
2024-09-05 18:46:34 -04:00
Tom Moor 7013a87c6e fix: Move wget installation and HEALTHCHECK to correct stage.
closes #7279
2024-09-04 22:30:59 -04:00
Ali AfsharzadehandGitHub 14a96e7262 Resolve buildx warnings during Docker image creation (#7246) 2024-07-15 16:56:56 -07:00
Tom MoorandGitHub f35676f347 Switch from Alpine -> Debian-slim (#7040)
* Switch from Alpine -> Debian-slim

* Drop arm/v6
2024-06-14 12:51:38 -07:00
Tom MoorandGitHub d3e0b19202 Update tests and docker to Node 20 LTS (#6204) 2023-11-22 17:51:56 -08:00
Tom MoorandGitHub 517f2634e3 chore: Create data directory inside Dockerfile (#5862) 2023-09-24 12:03:00 -07:00
Tom Moor fd700e6fd6 Install curl and update-ca-certificates in container
closes #5277
2023-05-15 23:04:38 -04:00
Mario NollandGitHub 35dbeae80b Add OCI image source label (#5338) 2023-05-13 11:23:39 -07:00
Tom MoorandGitHub 2cd5d0e624 chore: Bump Node to 18 LTS (#4795)
* Bump Node to 18 LTS

* Upgrade Jest
2023-02-16 05:33:54 -08:00
Yggdrasil80andGitHub 9390434dde feat: add arm64 docker image build (#3262)
* Add arm64 docker image build

* add arm64 docker image build

* fix: install missing docker buildx

* fix: new cimg orbs not working with this config

* fix misstake on qemu image name

* fix node:16 image not supported on arm/v5 and arm/v6

* add timeout to avoir errors

* fix docker buildx multiarch auto removing

* remove useless platforms, and keep only most used to reduce CI duration

* fix context issues

* fixed multiarch CI
2022-04-10 07:45:57 -07:00
Zero KingandGitHub ff662acfe0 chore: Update Node.js version (#2849) 2021-12-11 09:34:57 -08:00
Zero KingandGitHub 09afe7137d feat: Support custom CDN in Dockerfile (#2833) 2021-12-08 09:13:40 -08:00
Tom MoorandGitHub 57a2524fbd fix: /public directory missing in new docker releases (#2417)
closes #2416
2021-08-04 09:21:25 -07:00
Jack BaronandGitHub 52fc861bcf feat: Optimize Dockerfile (#2337)
* feat: optimize dockerfile
use new dockerfile syntaxes
leverage multi-stage builds
strip yarn cache from image
use stricter yarn install command
run as a non-root user

* fix: mark yarn-deduplicate as a required dep
`yarn --production` will fail on a clean install otherwise

* fix: add sequelize required files for migrations

* fix: use correct ARG syntax for multistage builds

* revert: mark yarn-deduplicate as a required dep
no longer required as of 0b3adad751
2021-08-03 13:22:41 -07:00
Tom Moor 6bb32c253b fix: Unable to run migrations in latest image. Added option to run non-SSL migration in production 2020-09-27 10:32:08 -07:00
Tom Moor f2abf38fe4 perf: Remove source once compiled 2020-09-05 12:57:27 -07:00
Tom Moor f0712e22d8 perf: Improving dockerfile 2020-09-05 12:44:40 -07:00
Tom Moor e7e289d9fa end 2020-09-04 23:28:29 -07:00
Tom Moor 713187cfb4 fix 2020-09-04 15:39:36 -07:00
Tom Moor e8719340d1 refactor: Remove babel/register for instant production server startup 2020-08-23 19:10:16 -07:00
Tom MoorandGitHub 67981a351e chore: Remove env variables in webpack bundle (#1353)
* chore: Remove env variables in webpack bundle

* remove unused globals

* refactor: consolidate window.env calls to single file

* fix: Slack client side integration auth

* fix: developers url
2020-07-18 11:02:40 -07:00
Tom MoorandGitHub 7e62b3b9aa chore: Upgrade Node to v12 (#1023)
* chore: Upgrade Node to v12

* test: Upgrade test node image
2019-08-23 18:14:51 -07:00
Tom Moor cf18b952a4 chore: Move Dockerfile to Alpine
closes #1020
2019-08-21 08:19:27 -07:00
ShyimandGitHub 7c01904cec Add missing expose 2019-07-29 20:48:26 +02:00
Tom Moor 2db8cdc7d1 Fixes #952 – Page jump 2019-05-19 17:49:51 -07:00
Tom Moor 49e5748a4f Change dev ports to reduce clashes 2019-03-30 23:34:56 -07:00
Erkka Makinen 006c6f137c Move PATH and NODE_ENV under Dockerfile. Fixes problem with PATH in
modified shell environment.
2018-08-14 08:04:52 +03:00
Tom Moor c599bb70ca Closes #666 2018-06-30 13:18:18 -07:00
Tom Moor cbd4003ddb Split deps, upgrade markdown editor to version with ES5 compilation 2018-05-12 15:22:33 -07:00
Saso Matejina 61c32ee175 support local development with docker 2017-12-05 10:42:52 -08:00