Skip to content

Commit 8578bb3

Browse files
committed
fix Dockerfile
1 parent 2397342 commit 8578bb3

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

Dockerfile

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,9 @@ RUN apk add --no-cache git rsync
88

99
WORKDIR /app
1010

11-
# Bust cache by fetching latest commit info
12-
ADD https://api.github.com/repos/cakephp/docs-skeleton/git/refs/heads/main /tmp/cache-bust.json
13-
14-
# Clone cakephp-docs-skeleton into vitepress directory
15-
RUN git clone --depth 1 https://github.com/cakephp/docs-skeleton.git vitepress
16-
17-
# Copy documentation and config files into the skeleton
18-
# Use rsync to merge docs instead of replacing to preserve shared public assets
19-
RUN --mount=type=bind,source=docs,target=/tmp/docs \
20-
rsync -av /tmp/docs/ vitepress/docs/
21-
22-
COPY config.js vitepress/config.js
23-
COPY toc_en.json vitepress/toc_en.json
24-
COPY toc_ja.json vitepress/toc_ja.json
25-
26-
# Install vitepress deps
27-
WORKDIR /app/vitepress
28-
RUN npm install
11+
# Copy everything to the container
12+
COPY . .
13+
RUN npm ci
2914

3015
# Increase max-old-space-size to avoid memory issues during build
3116
ENV NODE_OPTIONS="--max-old-space-size=8192"
@@ -39,7 +24,7 @@ RUN npm run docs:build
3924
FROM nginx:1.27-alpine AS runner
4025

4126
# Copy built files
42-
COPY --from=builder /app/vitepress/.vitepress/dist /usr/share/nginx/html
27+
COPY --from=builder /app/.vitepress/dist /usr/share/nginx/html
4328

4429
# Expose port
4530
EXPOSE 80

0 commit comments

Comments
 (0)