Compare commits

...

2 Commits

Author SHA1 Message Date
345d8218a0 添加一个 init 进程
All checks were successful
continuous-integration/drone/push Build is passing
2026-03-27 03:27:01 +08:00
d14aa31fea 优化 Docker 容器构建流程 2026-03-27 03:22:53 +08:00
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,5 @@
.DS_Store
node_modules
dist
/.drone.yml

View File

@ -1,12 +1,21 @@
FROM node:lts-alpine AS runtime
WORKDIR /app
COPY . .
# 提供一个很小很小的 init 进程
RUN apk add --no-cache tini
COPY package*.json .
RUN npm install
COPY . .
RUN npm run build
ENV HOST=0.0.0.0
ENV PORT=4321
ENTRYPOINT [ "/sbin/tini", "--" ]
CMD ["node", "./dist/server/entry.mjs"]