This commit is contained in:
parent
0adb553873
commit
244144aef4
34
Dockerfile
34
Dockerfile
|
|
@ -47,6 +47,25 @@ COPY --from=s3build /app/dist /dist
|
||||||
#EXPOSE 5000
|
#EXPOSE 5000
|
||||||
#CMD ["node", "dist/start/server.js"]
|
#CMD ["node", "dist/start/server.js"]
|
||||||
|
|
||||||
|
#============================================ chatai-ui ========================================================
|
||||||
|
FROM node:18.20.6 AS chataibuilder
|
||||||
|
|
||||||
|
# 安装指定版本的 npm 和 pm2
|
||||||
|
RUN npm install -g npm@10.8.2 \
|
||||||
|
&& npm install -g pm2@5.4.3
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# 拷贝依赖文件并安装生产依赖
|
||||||
|
COPY chatbot-ui/package.json chatbot-ui/package-lock.json ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
# 拷贝全部源码
|
||||||
|
COPY chatbot-ui/. .
|
||||||
|
|
||||||
|
# 构建项目
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
|
||||||
#============================================ gotrue build======================================================
|
#============================================ gotrue build======================================================
|
||||||
FROM golang:1.22.3-alpine3.20 as authbuild
|
FROM golang:1.22.3-alpine3.20 as authbuild
|
||||||
|
|
@ -336,7 +355,7 @@ ENTRYPOINT ["supervisord"]
|
||||||
|
|
||||||
HEALTHCHECK --interval=2s --timeout=2s --retries=10 CMD pg_isready -U postgres -h localhost
|
HEALTHCHECK --interval=2s --timeout=2s --retries=10 CMD pg_isready -U postgres -h localhost
|
||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
EXPOSE 5432
|
#EXPOSE 5432
|
||||||
|
|
||||||
ENV POSTGRES_HOST=/var/run/postgresql
|
ENV POSTGRES_HOST=/var/run/postgresql
|
||||||
ENV POSTGRES_USER=supabase_admin
|
ENV POSTGRES_USER=supabase_admin
|
||||||
|
|
@ -389,3 +408,16 @@ COPY --from=s3final node_modules /supabase/storage-api/node_modules
|
||||||
COPY --from=s3final dist /supabase/storage-api/dist
|
COPY --from=s3final dist /supabase/storage-api/dist
|
||||||
COPY --from=s3final migrations /supabase/storage-api/migrations
|
COPY --from=s3final migrations /supabase/storage-api/migrations
|
||||||
|
|
||||||
|
#========================================= chatai-ui ========================================================
|
||||||
|
# 拷贝依赖声明并安装仅生产依赖
|
||||||
|
COPY chatbot-ui/package.json chatbot-ui/package-lock.json supabase/chatai-ui/
|
||||||
|
RUN npm ci --omit=dev
|
||||||
|
|
||||||
|
# 拷贝构建产物和依赖
|
||||||
|
COPY --from=chataibuilder /app/.next supabase/chatai-ui/.next
|
||||||
|
COPY --from=chataibuilder /app/public supabase/chatai-ui/public
|
||||||
|
COPY --from=chataibuilder /app/node_modules supabase/chatai-ui/node_modules
|
||||||
|
COPY --from=chataibuilder /app/package.json supabase/chatai-ui/package.json
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
EXPOSE 3000
|
||||||
Loading…
Reference in New Issue