File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,13 +3,16 @@ FROM node:20-alpine AS frontend-builder
33
44RUN apk add --no-cache git python3 make g++
55
6+ RUN corepack enable && \
7+ corepack prepare pnpm@9.15.9 --activate
8+
69WORKDIR /build
710
811# 克隆并构建 2024 主题
912RUN git clone --depth 1 https://github.com/vastsa/FileCodeBoxFronted.git /build/fronted-2024 && \
1013 cd /build/fronted-2024 && \
11- npm install && \
12- npm run build
14+ pnpm install --frozen-lockfile --prod=false && \
15+ pnpm run build
1316
1417# 克隆并构建 2023 主题
1518RUN git clone --depth 1 https://github.com/vastsa/FileCodeBoxFronted2023.git /build/fronted-2023 && \
@@ -47,10 +50,4 @@ ENV HOST="0.0.0.0" \
4750EXPOSE 12345
4851
4952# 生产环境启动命令
50- CMD uvicorn main:app \
51- --host $HOST \
52- --port $PORT \
53- --workers $WORKERS \
54- --log-level $LOG_LEVEL \
55- --proxy-headers \
56- --forwarded-allow-ips "*"
53+ CMD ["sh" , "-c" , "exec uvicorn main:app --host \" $HOST\" --port \" $PORT\" --workers \" $WORKERS\" --log-level \" $LOG_LEVEL\" --proxy-headers --forwarded-allow-ips '*'" ]
You can’t perform that action at this time.
0 commit comments