diff --git a/.drone.yml b/.drone.yml index 69e1db1..62f860f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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}' diff --git a/Dockerfile b/Dockerfile index e7d70a4..b61d558 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ No newline at end of file