File tree 2 files changed +52
-0
lines changed
2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Node modules (we'll install fresh in the image)
2
+ node_modules
3
+ npm-debug.log
4
+ yarn-error.log
5
+
6
+ # Logs
7
+ logs
8
+ * .log
9
+
10
+ # Environment files (optional for security)
11
+ .env
12
+ .env. *
13
+
14
+ # OS & editor junk
15
+ .DS_Store
16
+ Thumbs.db
17
+ * .swp
18
+ * .swo
19
+ .idea
20
+ .vscode
21
+
22
+ # Test coverage / build artifacts
23
+ coverage
24
+ dist
25
+ build
26
+ tmp
27
+ .cache
28
+
29
+ # Git
30
+ .git
31
+ .gitignore
32
+
33
+ # Dockerignore itself (not needed inside the image)
34
+ .dockerignore
Original file line number Diff line number Diff line change
1
+ FROM node:23.11-slim AS node_base
2
+ WORKDIR /app
3
+
4
+ FROM node_base AS builder
5
+ RUN npm install -g typescript shx
6
+
7
+ COPY package.json yarn.lock tsconfig.json ./
8
+ RUN --mount=type=cache,target=/usr/local/share/.cache/yarn yarn install --ignore-scripts --omit-dev
9
+
10
+ COPY . ./
11
+ RUN --mount=type=cache,target=/usr/local/share/.cache/yarn tsc && shx chmod +x dist/*.js
12
+
13
+ FROM node_base
14
+ COPY package.json yarn.lock ./
15
+ COPY --from=builder /app/dist ./dist
16
+ ENV NODE_ENV=production
17
+ RUN --mount=type=cache,target=/usr/local/share/.cache/yarn yarn install --ignore-scripts --omit-dev
18
+ ENTRYPOINT ["node" , "/app/dist/index.js" ]
You can’t perform that action at this time.
0 commit comments