Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit91608d0

Browse files
committed
chore: improve Docker setup
1 parent1f5f016 commit91608d0

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

‎.dockerignore‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
node_modules
1+
node_modules
2+
.git
3+
*.log
4+
*.env
5+
Dockerfile
6+
.dockerignore
7+
__tests__/
8+
coverage/
9+
dist/

‎Dockerfile‎

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,30 @@
1-
FROM node:20 AS base
2-
3-
RUN npm install -g pnpm
4-
5-
RUN pnpm config set httpTimeout 1200000
1+
FROM node:20-slim AS base
62

73
WORKDIR /snailycad
84

9-
COPY . ./
5+
# Install pnpm globally and set config in one layer
6+
RUN npm install -g pnpm && pnpm config set httpTimeout 1200000
7+
8+
# Copy only package files first for better caching
9+
COPY pnpm-lock.yaml package.json ./
1010

1111
FROM base AS deps
1212

13-
RUN pnpm install
13+
RUN pnpm install --frozen-lockfile
1414

15-
FROM deps AS api
15+
# Copy the rest of the source code
16+
COPY . ./
1617

18+
FROM deps AS api
1719
ENV NODE_ENV="production"
18-
1920
RUN pnpm turbo run build --filter=@snailycad/api
20-
2121
WORKDIR /snailycad/apps/api
22-
2322
CMD ["pnpm","start"]
2423

2524
FROM deps AS client
26-
2725
ENV NODE_ENV="production"
28-
2926
RUN rm -rf /snailycad/apps/client/.next
30-
3127
RUN pnpm create-images-domain
32-
3328
RUN pnpm turbo run build --filter=@snailycad/client
34-
3529
WORKDIR /snailycad/apps/client
36-
3730
CMD ["pnpm","start"]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp