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

Commitc219bfe

Browse files
committed
fix: Dockerfile
1 parentb92654c commitc219bfe

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

‎Dockerfile‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,31 @@ WORKDIR /snailycad
55
# Install pnpm globally and set config in one layer
66
RUN npm install -g pnpm && pnpm config set httpTimeout 1200000
77

8-
# Copyonly package files first for better caching
9-
COPYpnpm-lock.yaml package.json ./
8+
# Copythe rest of the source code
9+
COPY. ./
1010

1111
FROM base AS deps
1212

1313
RUN pnpm install --frozen-lockfile
1414

15-
# Copy the rest of the source code
16-
COPY . ./
15+
FROM deps AS build
16+
17+
ENV NODE_ENV="production"
18+
19+
# Build all packages (this will also build the API and Client)
20+
RUN pnpm turbo run build --filter="{packages/*}"
21+
1722

18-
FROMdeps AS api
23+
FROMbuild AS api
1924
ENV NODE_ENV="production"
20-
RUN pnpm turbo run build --filter=@snailycad/api
2125
WORKDIR /snailycad/apps/api
26+
RUN pnpm run build
2227
CMD ["pnpm","start"]
2328

24-
FROMdeps AS client
29+
FROMbuild AS client
2530
ENV NODE_ENV="production"
31+
WORKDIR /snailycad/apps/client
2632
RUN rm -rf /snailycad/apps/client/.next
2733
RUN pnpm create-images-domain
28-
RUN pnpm turbo run build --filter=@snailycad/client
29-
WORKDIR /snailycad/apps/client
34+
RUN pnpm run build
3035
CMD ["pnpm","start"]

‎scripts/create-images-domain.mjs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ function getNextConfigPath() {
2424
asyncfunctionloadNextConfig(){
2525
constconfigFilePath=getNextConfigPath();
2626

27-
constdata=awaitimport(configFilePath);
2827
consttext=awaitreadFile(configFilePath,"utf8");
2928

30-
return{data,text};
29+
return{ text};
3130
}
3231

3332
asyncfunctionwriteNextConfig(data){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp