Skip to content

Commit

Permalink
refactor: fuck vite defineConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
zyronon committed May 1, 2024
1 parent 7f1e157 commit d052f60
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 248 deletions.
25 changes: 25 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

.DS_Store
coverage
*.local

dist
node_modules
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
docs
node
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# syntax = docker/dockerfile:experimental
FROM --platform=${BUILDPLATFORM:-linux/amd64,linux/arm64} node:18-buster AS builder
FROM --platform=${BUILDPLATFORM:-linux/amd64,linux/arm64} node:20-buster AS builder

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

WORKDIR /app
COPY . .
WORKDIR /src
COPY ./ ./

# RUN两次方便观察install和build, 也可以用pnpm cache and locked
RUN pnpm install && pnpm run build
RUN pnpm install
RUN npm run build

FROM --platform=${BUILDPLATFORM:-linux/amd64,linux/arm64} ghcr.io/rookie-luochao/nginx-runner:latest

COPY --from=builder /app/dist .
COPY --from=builder /src/dist /app
183 changes: 0 additions & 183 deletions src/App2.vue

This file was deleted.

60 changes: 0 additions & 60 deletions src/main2.ts

This file was deleted.

0 comments on commit d052f60

Please sign in to comment.