pull/243/head
xiaojunnuo 2024-11-04 13:32:02 +08:00
parent cbe3498125
commit 0f572f4cb3
2 changed files with 14 additions and 2 deletions

View File

@ -10,13 +10,25 @@ RUN npm install -g pnpm@8.15.7
RUN cp /workspace/certd-client/dist/* /workspace/certd-server/public/ -rf
RUN cd /workspace/certd-server && pnpm install && npm run build-on-docker
FROM node:18-alpine
RUN apk add --no-cache openssl
RUN apk add --no-cache openjdk8
WORKDIR /app/
COPY --from=builder /workspace/certd-server/ /app/
ENV LEGO_VERSION=4.19.2
ENV LEGO_DOWNLOAD_DIR /app/tools/linux
RUN mkdir -p $LEGO_DOWNLOAD_DIR
# 根据架构下载不同的文件
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then \
wget -O $LEGO_DOWNLOAD_DIR/lego_linux_amd64.tar.gz https://github.com/go-acme/lego/releases/download/v${LEGO_VERSION}/lego_v${LEGO_VERSION}_linux_arm64.tar.gz; \
elif [ "$ARCH" = "aarch64" ]; then \
wget -O $LEGO_DOWNLOAD_DIR/lego_linux_arm64.tar.gz https://github.com/go-acme/lego/releases/download/v${LEGO_VERSION}/lego_v${LEGO_VERSION}_linux_amd64.tar.gz; \
else \
echo "Unsupported architecture: $ARCH"; \
fi
ENV TZ=Asia/Shanghai
ENV NODE_ENV=production

View File

@ -1,6 +1,6 @@
#
set -e
echo "即将删除packages下除ui之外的其他目录按y确认"
echo "即将删除packages下除ui之外的其他目录按y确认如果您没有修改过源码按y即可"
read -p "y/n: " confirm
if [ $confirm != "y" ]; then
echo "取消操作"