Commit 2885d275 authored by jaden's avatar jaden

fix: fix build image file

parent 36ee82fd
...@@ -9,6 +9,10 @@ jobs: ...@@ -9,6 +9,10 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install dependencies & build next app
run: |
npm install
npm run build
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
......
...@@ -5,7 +5,8 @@ FROM node:18 ...@@ -5,7 +5,8 @@ FROM node:18
WORKDIR /app WORKDIR /app
# 复制整个应用到容器中 # 复制整个应用到容器中
COPY ./ /app COPY package*.json ./
COPY pnpm-lock.yaml ./
# 安装依赖 # 安装依赖
RUN npm i -g pnpm RUN npm i -g pnpm
...@@ -21,7 +22,7 @@ ARG OPENAI_PROXY_URL ...@@ -21,7 +22,7 @@ ARG OPENAI_PROXY_URL
ENV OPENAI_PROXY_URL $OPENAI_PROXY_URL ENV OPENAI_PROXY_URL $OPENAI_PROXY_URL
# 执行构建命令 # 执行构建命令
RUN yarn build COPY .next ./.next
# 暴露 3000 端口 # 暴露 3000 端口
EXPOSE 3000 EXPOSE 3000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment