Skip to content

Commit 133dceb

Browse files
committed
chore: 更新Dockerfile和docker-compose.yml配置
更新Dockerfile中的Rust和Node.js版本,移除docker-compose.yml中的版本声明,并在blog-web的Dockerfile中添加pnpm安装步骤
1 parent 1f49499 commit 133dceb

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.77 as builder
1+
FROM rust:1.86.0 AS builder
22

33
WORKDIR /usr/src/app
44
COPY . .

blog-web/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Stage 1: Build WASM
22
# Use a specific Rust version for reproducibility
3-
FROM rust:1.78 as wasm-builder
3+
FROM rust:1.86.0 AS wasm-builder
44

55
WORKDIR /usr/src/app
66

@@ -17,7 +17,7 @@ COPY ./md-wasm ./md-wasm
1717
RUN wasm-pack build ./md-wasm --target web
1818

1919
# Stage 2: Build Astro application
20-
FROM node:20-slim as builder
20+
FROM node:20-slim AS builder
2121

2222
WORKDIR /app
2323

@@ -49,6 +49,7 @@ FROM node:20-slim
4949

5050
WORKDIR /app
5151

52+
RUN npm install -g pnpm
5253
# Copy built application from the builder stage
5354
COPY --from=builder /app/dist /app/dist
5455
# Copy package.json for running the app (Astro's node adapter might need it)
@@ -57,7 +58,7 @@ COPY --from=builder /app/package.json /app/
5758
# Install production dependencies only
5859
# Astro's standalone mode for the node adapter bundles dependencies,
5960
# but following the original Dockerfile's pattern.
60-
RUN npm install --omit=dev
61+
RUN pnpm install --prod
6162

6263
EXPOSE 4321
6364

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3.8'
2-
31
services:
42
postgres:
53
image: postgres:16

0 commit comments

Comments
 (0)