Skip to content

Commit 84e20e9

Browse files
authored
fix: improve dev setup time and container size (#3515)
* fix: improve dev setup time and container size * fix: space
1 parent 6683815 commit 84e20e9

7 files changed

Lines changed: 12 additions & 14 deletions

File tree

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ node_modules
22
config.js
33

44
# infra files
5-
infra/
5+
infra/**/*
66

77
# git
88
.git

Dockerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ FROM base AS dev
5252
ENV NODE_ENV=development
5353
ENV PORT=3000
5454

55-
COPY package.json pnpm-lock.yaml ./
56-
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
57-
58-
COPY . .
59-
6055
EXPOSE 3000
6156

6257
CMD ["pnpm", "start"]

infra/docker-compose.dev.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.9"
21
name: pubpub_v6_dev
32

43
services:
@@ -10,6 +9,7 @@ services:
109
env_file:
1110
- .env.dev
1211
environment:
12+
IS_DUQDUQ: ""
1313
NODE_ENV: development
1414
PORT: 3000
1515
# disable this
@@ -24,7 +24,6 @@ services:
2424
networks: [appnet]
2525
volumes:
2626
- ..:/app
27-
- /app/node_modules
2827

2928
worker:
3029
build:
@@ -40,12 +39,12 @@ services:
4039
command: ["pnpm", "run", "workers-dev"]
4140
depends_on:
4241
- db
42+
- app
4343
- rabbitmq
4444
- app
4545
networks: [appnet]
4646
volumes:
4747
- ..:/app
48-
- /app/node_modules
4948

5049
rabbitmq:
5150
image: rabbitmq:3.13-alpine
@@ -86,7 +85,7 @@ services:
8685
- .env.dev
8786
environment:
8887
NODE_ENV: development
89-
command: ['pnpm', 'run', 'cron']
88+
command: ["pnpm", "run", "cron"]
9089
networks: [appnet]
9190
volumes:
9291
- ..:/app

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@
274274
"packageManager": "pnpm@10.4.0",
275275
"devDependencies": {
276276
"@biomejs/biome": "^2.3.6",
277+
"@esbuild/linux-arm64": "0.27.3",
277278
"@sentry/cli": "^2.20.5",
278279
"@sentry/webpack-plugin": "^2.7.0",
279280
"@storybook/addon-knobs": "^6.4.0",

pnpm-lock.yaml

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// should have any effect on our TS builds since "exclude" only removes files from the "include"
66
// array (which we specify in the client/server specific .tsconfig.json files) and those don't
77
// contain node_modules/ or dist/ to begin with.
8-
"exclude": ["**/node_modules/*", "**/dist/*", "**/sdk/**"],
8+
"exclude": ["**/node_modules/**/*", "**/dist/**/*", "./sdk/**"],
99
"compilerOptions": {
1010
/* Visit https://aka.ms/tsconfig.json to read more about this file */
1111
/* Basic Options */

tsconfig.server.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"../**/__test__/**/*",
2020
"../**/*.test.ts",
2121
"../**/*.test.js",
22-
"../**/*.stories.tsx"
22+
"../**/*.stories.tsx",
23+
"./dist/**/*"
2324
]
2425
}

0 commit comments

Comments
 (0)