Skip to content

chore: add containerised dev environment - #271

Open
lgnap wants to merge 1 commit into
ThemeParks:mainfrom
lgnap:chore/containerised-dev-env
Open

chore: add containerised dev environment#271
lgnap wants to merge 1 commit into
ThemeParks:mainfrom
lgnap:chore/containerised-dev-env

Conversation

@lgnap

@lgnap lgnap commented Jul 31, 2026

Copy link
Copy Markdown

Run the harness, tests and build without installing Node 24 / npm 11 on the host. The image pins the versions from package.json "engines", so contributors get the same toolchain regardless of what their distro ships.

  • Dockerfile: node:24-slim, deps installed in their own layer. npm ci uses --ignore-scripts because the root "prepare": "tsc" hook cannot run before the sources are copied, and is unnecessary: tsx executes TypeScript directly.
  • docker-entrypoint.sh: creates an empty .env when absent (every npm script runs tsx --env-file=.env, which aborts on a missing file) and restores node_modules on the first run with a bind mount.
  • docker-compose.yml: bind-mounts the tree with :z for SELinux, keeps node_modules in a named volume so it never lands in the host tree.
  • Makefile: self-documenting targets (make park PARK=efteling, make test, make web...). Defaults to podman-compose; override with make COMPOSE="docker compose" dev on a Docker host.
  • .dockerignore: excludes caches, secrets and build output from the context.

Verified in-container: make compile clean, make test 1536 tests passing.

Run the harness, tests and build without installing Node 24 / npm 11 on the
host. The image pins the versions from package.json "engines", so contributors
get the same toolchain regardless of what their distro ships.

- Dockerfile: node:24-slim, deps installed in their own layer. `npm ci` uses
  --ignore-scripts because the root "prepare": "tsc" hook cannot run before the
  sources are copied, and is unnecessary: tsx executes TypeScript directly.
- docker-entrypoint.sh: creates an empty .env when absent (every npm script
  runs `tsx --env-file=.env`, which aborts on a missing file) and restores
  node_modules on the first run with a bind mount.
- docker-compose.yml: bind-mounts the tree with :z for SELinux, keeps
  node_modules in a named volume so it never lands in the host tree.
- Makefile: self-documenting targets (make park PARK=efteling, make test,
  make web...). Defaults to podman-compose; override with
  `make COMPOSE="docker compose" dev` on a Docker host.
- .dockerignore: excludes caches, secrets and build output from the context.

Verified in-container: `make compile` clean, `make test` 1536 tests passing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lgnap lgnap changed the title chore: add containerised dev environment Draft: chore: add containerised dev environment Jul 31, 2026
@lgnap lgnap changed the title Draft: chore: add containerised dev environment chore: add containerised dev environment Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant