This commit is contained in:
sjk
2025-11-17 13:39:05 +08:00
commit d4cfe2b9de
479 changed files with 109324 additions and 0 deletions

32
client/Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
# 使用官方Flutter镜像作为构建环境
FROM cirrusci/flutter:stable AS build
# 设置工作目录
WORKDIR /app
# 复制pubspec文件
COPY pubspec.yaml pubspec.lock ./
# 获取依赖
RUN flutter pub get
# 复制源代码
COPY . .
# 构建Web应用
RUN flutter build web --release
# 使用nginx作为生产环境
FROM nginx:alpine
# 复制构建产物到nginx目录
COPY --from=build /app/build/web /usr/share/nginx/html
# 复制nginx配置
COPY nginx.conf /etc/nginx/nginx.conf
# 暴露端口
EXPOSE 80
# 启动nginx
CMD ["nginx", "-g", "daemon off;"]