-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
61 lines (59 loc) · 2.64 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
61 lines (59 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# The NestJS backend for local development, in watch mode against the bind-mounted sources.
#
# pnpm dev # starts this, then runs apps/web natively on the host
# pnpm dev:build # rebuild the image after a dependency change
# pnpm dev:down # stop and remove the container
#
# Requires a root .env (copy .env.example and fill in the Supabase values).
#
# apps/web deliberately stays off this stack. A container reads bind-mounted files through
# the host boundary, which on Windows costs milliseconds per file — Vite pays that thousands
# of times per render, and it also gets no inotify events, so the watcher has to poll. The
# backend touches files rarely enough that neither matters to it.
services:
backend:
build:
context: .
dockerfile: Dockerfile.dev
command: pnpm --filter app-backend run start:dev
env_file:
- .env
init: true
environment:
NODE_ENV: development
PORT: 3001
CORS_ORIGINS: http://localhost:5173
# tsc watches through inotify, which containers receive only for files stored in the
# Linux filesystem — a bind-mounted host directory needs polling instead. On a Linux
# host, set both to UseFsEvents in .env.
TSC_WATCHFILE: ${TSC_WATCHFILE:-DynamicPriorityPolling}
TSC_WATCHDIRECTORY: ${TSC_WATCHDIRECTORY:-DynamicPriorityPolling}
ports:
- "3001:3001"
volumes:
- .:/app:cached
# Keep the container's own dependencies: the host install carries host-native binaries
# and pnpm symlinks that do not survive the mount. One entry per workspace package,
# because the backend resolves @languages-learner/* through those symlinks.
- /app/node_modules
- /app/apps/backend/node_modules
- /app/apps/storybook/node_modules
- /app/apps/web/node_modules
- /app/apps/web-e2e/node_modules
- /app/packages/api/node_modules
- /app/packages/app-core-tests-utils/node_modules
- /app/packages/app-integration-tests-utils/node_modules
- /app/packages/class-names/node_modules
- /app/packages/component-core-tests-utils/node_modules
- /app/packages/data-source/node_modules
- /app/packages/error-utils/node_modules
- /app/packages/form-components/node_modules
- /app/packages/har-sanitizer/node_modules
- /app/packages/i18n-core/node_modules
- /app/packages/locale/node_modules
- /app/packages/playwright-utils/node_modules
- /app/packages/react-router-utils/node_modules
- /app/packages/react-utils/node_modules
- /app/packages/tailwind/node_modules
- /app/packages/uikit/node_modules
- /app/packages/zod/node_modules