Compare commits
2 Commits
2ef9f8156c
...
ff2f21f145
Author | SHA1 | Date | |
---|---|---|---|
ff2f21f145 | |||
f3b7a5aa62 |
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
@@ -56,7 +56,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -74,30 +74,8 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Package
|
||||
run: bash ./patch-ui-pro.zsh
|
||||
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
|
||||
generate:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Generate
|
||||
run: pnpm run generate
|
||||
run: pnpm run build
|
70
Dockerfile
70
Dockerfile
@@ -1,37 +1,35 @@
|
||||
# ------------- 依赖缓存阶段 -------------
|
||||
FROM node:22.16-alpine AS base
|
||||
|
||||
# 国内镜像
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
# 置顶安装 pnpm@10.13.1
|
||||
RUN npm install -g pnpm@10.13.1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 1️⃣ 先把锁文件拷进来,让这一层可以 cache
|
||||
COPY package.json pnpm-lock.yaml .npmrc ./
|
||||
|
||||
# 2️⃣ 再执行安装
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# 3️⃣ 再拷剩余源码
|
||||
COPY . .
|
||||
RUN chmod +x patch-ui-pro.zsh && ./patch-ui-pro.zsh
|
||||
|
||||
# ------------- 构建阶段 -------------
|
||||
FROM base AS builder
|
||||
RUN pnpm build
|
||||
|
||||
# ------------- 运行阶段 -------------
|
||||
FROM node:22.16-alpine AS production
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 拷贝构建产物
|
||||
COPY --from=builder /app/.output ./.output
|
||||
|
||||
EXPOSE 3000
|
||||
ENV NODE_ENV=production HOST=0.0.0.0 PORT=3000
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
RUN corepack enable
|
||||
|
||||
# Copy package.json and your lockfile, here we add pnpm-lock.yaml for illustration
|
||||
COPY package.json pnpm-lock.yaml .npmrc ./
|
||||
|
||||
# Install dependencies
|
||||
RUN pnpm i
|
||||
|
||||
# Copy the entire project
|
||||
COPY . ./
|
||||
|
||||
# Build the project
|
||||
RUN chmod +x patch-ui-pro.zsh && ./patch-ui-pro.zsh
|
||||
RUN pnpm run build
|
||||
|
||||
# Build Stage 2
|
||||
|
||||
FROM node:22-alpine
|
||||
WORKDIR /app
|
||||
|
||||
# Only `.output` folder is needed from the build stage
|
||||
COPY --from=build /app/.output/ ./
|
||||
|
||||
# Change the port and host
|
||||
ENV PORT=3000
|
||||
ENV HOST=0.0.0.0
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "/app/server/index.mjs"]
|
@@ -3,25 +3,25 @@ const providers = ref([
|
||||
{
|
||||
label: 'Google',
|
||||
icon: 'simple-icons-google',
|
||||
color: 'neutral',
|
||||
variant: 'subtle'
|
||||
color: 'neutral' as const,
|
||||
variant: 'subtle' as const
|
||||
},
|
||||
{
|
||||
label: 'GitHub',
|
||||
icon: 'simple-icons-github',
|
||||
color: 'neutral',
|
||||
variant: 'subtle'
|
||||
color: 'neutral' as const,
|
||||
variant: 'subtle' as const
|
||||
}
|
||||
])
|
||||
const fields = ref([
|
||||
{
|
||||
name: 'email',
|
||||
type: 'text',
|
||||
type: 'text' as const,
|
||||
label: 'Email'
|
||||
},
|
||||
{
|
||||
name: 'password',
|
||||
type: 'password',
|
||||
type: 'password' as const,
|
||||
label: 'Password'
|
||||
}
|
||||
])
|
||||
|
@@ -3,25 +3,25 @@ const providers = ref([
|
||||
{
|
||||
label: 'Google',
|
||||
icon: 'simple-icons-google',
|
||||
color: 'neutral',
|
||||
variant: 'subtle'
|
||||
color: 'neutral' as const,
|
||||
variant: 'subtle' as const
|
||||
},
|
||||
{
|
||||
label: 'GitHub',
|
||||
icon: 'simple-icons-github',
|
||||
color: 'neutral',
|
||||
variant: 'subtle'
|
||||
color: 'neutral' as const,
|
||||
variant: 'subtle' as const
|
||||
}
|
||||
])
|
||||
const fields = ref([
|
||||
{
|
||||
name: 'email',
|
||||
type: 'text',
|
||||
type: 'text' as const,
|
||||
label: 'Email'
|
||||
},
|
||||
{
|
||||
name: 'password',
|
||||
type: 'password',
|
||||
type: 'password' as const,
|
||||
label: 'Password'
|
||||
}
|
||||
])
|
||||
|
Reference in New Issue
Block a user