feat: 完善部署。
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Ivan Li 2022-10-09 13:04:51 +08:00
parent adb7b2cf3f
commit 9cef9fe8d8
2 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ steps:
dockerfile: Dockerfile
target: release
cache_from:
- docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-base:${DRONE_BRANCH}${DRONE_TAG}-amd64
- docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog:${DRONE_BRANCH}${DRONE_TAG}-amd64
tags:
- '${DRONE_COMMIT_SHA:0:8}'
- '${DRONE_BRANCH}${DRONE_TAG}'

View File

@ -4,12 +4,12 @@ WORKDIR /app
COPY pnpm-lock.yaml package.json ./
RUN npm i --location=global pnpm@7 &&\
pnpm i
COPY . .
RUN pnpm build &&\
pnpm prune --prod
FROM node:16-alpine as release
WORKDIR /app
COPY . .
COPY --from=base /app ./
RUN pnpm build &&\
pnpm prune --prod
EXPOSE 80
CMD pnpm serve -p 80