mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 23:56:39 +08:00
commit
f1dde29cbd
@ -28,6 +28,13 @@ jobs:
|
|||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: cache.Dockerfile
|
file: cache.install.Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: sijinhui/chatgpt-next-web:installcache
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: cache.build.Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: sijinhui/chatgpt-next-web:buildcache
|
tags: sijinhui/chatgpt-next-web:buildcache
|
||||||
|
47
Dockerfile
47
Dockerfile
@ -1,27 +1,36 @@
|
|||||||
FROM sijinhui/chatgpt-next-web:buildcache AS deps
|
#FROM sijinhui/chatgpt-next-web:installcache AS deps
|
||||||
|
#
|
||||||
|
#WORKDIR /app
|
||||||
|
#
|
||||||
|
#COPY package.json yarn.lock ./
|
||||||
|
#
|
||||||
|
#RUN yarn install
|
||||||
|
#
|
||||||
|
#FROM sijinhui/node:base AS builder
|
||||||
|
#
|
||||||
|
#RUN apk add --no-cache git libc6-compat
|
||||||
|
#
|
||||||
|
#ENV OPENAI_API_KEY=""
|
||||||
|
#ENV GOOGLE_API_KEY=""
|
||||||
|
#ENV CODE=""
|
||||||
|
#
|
||||||
|
#WORKDIR /app
|
||||||
|
#COPY . .
|
||||||
|
#COPY --from=deps /app/node_modules ./node_modules
|
||||||
|
## 避免下面那个报错
|
||||||
|
## RUN mkdir -p "/app/node_modules/tiktoken" && mkdir -p "/app/node_modules/sharp"
|
||||||
|
## RUN yarn add sharp
|
||||||
|
## ENV NEXT_SHARP_PATH /app/node_modules/sharp
|
||||||
|
#RUN yarn build
|
||||||
|
|
||||||
WORKDIR /app
|
FROM sijinhui/chatgpt-next-web:buildcache as base
|
||||||
|
|
||||||
COPY package.json yarn.lock ./
|
|
||||||
|
|
||||||
RUN yarn install
|
|
||||||
|
|
||||||
FROM sijinhui/node:base AS builder
|
FROM sijinhui/node:base AS builder
|
||||||
|
|
||||||
RUN apk add --no-cache git libc6-compat
|
|
||||||
|
|
||||||
ENV OPENAI_API_KEY=""
|
|
||||||
ENV GOOGLE_API_KEY=""
|
|
||||||
ENV CODE=""
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=base /app/.next ./next
|
||||||
# 避免下面那个报错
|
COPY --from=base /app/node_modules ./node_modules
|
||||||
# RUN mkdir -p "/app/node_modules/tiktoken" && mkdir -p "/app/node_modules/sharp"
|
RUN yarn install && yarn build
|
||||||
# RUN yarn add sharp
|
|
||||||
# ENV NEXT_SHARP_PATH /app/node_modules/sharp
|
|
||||||
RUN yarn build
|
|
||||||
|
|
||||||
FROM sijinhui/node:base AS runner
|
FROM sijinhui/node:base AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
18
cache.build.Dockerfile
Normal file
18
cache.build.Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
FROM sijinhui/chatgpt-next-web:installcache AS deps
|
||||||
|
|
||||||
|
FROM sijinhui/node:base AS builder
|
||||||
|
|
||||||
|
RUN apk add --no-cache git libc6-compat
|
||||||
|
|
||||||
|
ENV OPENAI_API_KEY=""
|
||||||
|
ENV GOOGLE_API_KEY=""
|
||||||
|
ENV CODE=""
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
|
# 避免下面那个报错
|
||||||
|
# RUN mkdir -p "/app/node_modules/tiktoken" && mkdir -p "/app/node_modules/sharp"
|
||||||
|
# RUN yarn add sharp
|
||||||
|
# ENV NEXT_SHARP_PATH /app/node_modules/sharp
|
||||||
|
RUN yarn build
|
@ -1,4 +1,4 @@
|
|||||||
FROM hub.si.icu/library/node:22.1-alpine AS base
|
FROM node:22.1-alpine AS base
|
||||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
|
||||||
RUN apk add --no-cache tzdata
|
RUN apk add --no-cache tzdata
|
||||||
# 设置时区环境变量
|
# 设置时区环境变量
|
||||||
|
Loading…
Reference in New Issue
Block a user