File tree Expand file tree Collapse file tree 7 files changed +67
-14
lines changed
Expand file tree Collapse file tree 7 files changed +67
-14
lines changed Original file line number Diff line number Diff line change 8989 - name : Install pnpm
9090 uses : pnpm/action-setup@v4
9191 with :
92- cache : true
92+ version : 10
9393
9494 - name : Install dependencies
9595 run : pnpm install --frozen-lockfile
Original file line number Diff line number Diff line change 6565 - name : Install pnpm
6666 uses : pnpm/action-setup@v4
6767 with :
68- cache : true
68+ version : 10
6969
7070 - name : Install dependencies
7171 run : pnpm install --frozen-lockfile
Original file line number Diff line number Diff line change 5858 - name : Install pnpm
5959 uses : pnpm/action-setup@v4
6060 with :
61- cache : true
61+ version : 10
6262
6363 - name : Install dependencies
6464 run : pnpm install --frozen-lockfile
Original file line number Diff line number Diff line change @@ -3,10 +3,12 @@ services:
33 build :
44 context : .
55 dockerfile : ./docker/Dockerfile
6+ # dockerfile: ./docker/Dockerfile.local
67 image : payload
78 container_name : payload
89 restart : unless-stopped
910 command : sh -c "pnpm ${APP_CMD:-dev}"
11+ # command: sh -c "pnpm build && pnpm ${APP_CMD:-start}"
1012 ports :
1113 - ' 3000:3000'
1214 volumes :
@@ -16,7 +18,6 @@ services:
1618 - ~/.aws:/home/node/.aws
1719 # - ~/.npmrc:/home/node/.npmrc:ro'
1820 environment :
19- - NODE_ENV=development
2021 - APP_CMD=${APP_CMD:-dev} # 默认为 dev
2122 env_file :
2223 - .env
Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ RUN apt-get update && \
2323ENV PNPM_HOME="/home/node/.pnpm-store"
2424ENV PATH="$PNPM_HOME:$PATH"
2525
26+ # 创建 pnpm store 并赋权
27+ RUN mkdir -p /home/node/.pnpm-store && chown -R node:node /home/node/.pnpm-store
28+
2629# 安装 pnpm
2730RUN corepack enable && corepack prepare pnpm@latest --activate
2831
Original file line number Diff line number Diff line change 1+ FROM node:24-slim AS base
2+
3+ # # ================== postgres client install begin ==================
4+ # # 安装基础依赖
5+ # RUN apt-get update && apt-get install -y \
6+ # curl \
7+ # ca-certificates \
8+ # gnupg \
9+ # lsb-release \
10+ # --no-install-recommends
11+
12+ # # 导入 PostgreSQL 官方 GPG 密钥并设置存储库
13+ # RUN curl -fSsL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /usr/share/keyrings/postgresql-archive-keyring.gpg && \
14+ # echo "deb [signed-by=/usr/share/keyrings/postgresql-archive-keyring.gpg] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
15+
16+ # # 安装 PostgreSQL 18 客户端
17+ # RUN apt-get update && \
18+ # apt-get install -y postgresql-client-18 && \
19+ # rm -rf /var/lib/apt/lists/*
20+ # # ================== postgres client install end ==================
21+
22+ # 基础环境
23+ ENV PNPM_HOME="/home/node/.pnpm-store"
24+ ENV PATH="$PNPM_HOME:$PATH"
25+ COPY .npmrc /home/node/
26+
27+ # 创建 pnpm store 并赋权
28+ RUN mkdir -p /home/node/.pnpm-store && chown -R node:node /home/node/.pnpm-store
29+
30+ # 安装 pnpm
31+ COPY .npmrc /root/
32+ # RUN corepack enable && corepack prepare pnpm@latest --activate
33+ RUN npm install -g pnpm
34+
35+ # 依赖安装阶段
36+ FROM base AS deps
37+ WORKDIR /app
38+ # 先创建目录并赋权
39+ RUN mkdir -p /app && chown -R node:node /app
40+ USER node
41+ COPY --chown=node:node package.json pnpm-lock.yaml ./
42+ # 显式指向 store
43+ RUN pnpm config set store-dir /home/node/.pnpm-store && \
44+ pnpm install --frozen-lockfile
45+
46+ # 运行阶段
47+ FROM base AS runner
48+ WORKDIR /app
49+ USER node
50+ COPY --from=deps --chown=node:node /app/node_modules ./node_modules
51+ COPY --chown=node:node . .
52+
53+ ENV NODE_ENV=development
54+
55+ EXPOSE 3000
Original file line number Diff line number Diff line change 1- import * as migration_20260106_184630 from './20260106_184630' ;
2- import * as migration_20260107_045216 from './20260107_045216' ;
3- import * as migration_20260111_154244 from './20260111_154244' ;
4- import * as migration_20260115_132347 from './20260115_132347' ;
1+ import * as migration_20260106_184630 from './20260106_184630'
2+ import * as migration_20260107_045216 from './20260107_045216'
3+ import * as migration_20260111_154244 from './20260111_154244'
54
65export const migrations = [
76 {
@@ -19,9 +18,4 @@ export const migrations = [
1918 down : migration_20260111_154244 . down ,
2019 name : '20260111_154244' ,
2120 } ,
22- {
23- up : migration_20260115_132347 . up ,
24- down : migration_20260115_132347 . down ,
25- name : '20260115_132347'
26- } ,
27- ] ;
21+ ]
You can’t perform that action at this time.
0 commit comments