jack 1 ay önce
ebeveyn
işleme
cef5e9affd
3 değiştirilmiş dosya ile 10 ekleme ve 24 silme
  1. 3 1
      .idea/workspace.xml
  2. 6 22
      Dockerfile
  3. 1 1
      docker-compose.yaml

+ 3 - 1
.idea/workspace.xml

@@ -5,7 +5,9 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="13677a44-a809-4923-8c11-1cbd6d3c8a96" name="更改" comment="">
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/Dockerfile" beforeDir="false" afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/docker-compose.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/docker-compose.yaml" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -95,7 +97,7 @@
       <option name="number" value="Default" />
       <option name="presentableId" value="Default" />
       <updated>1762247313757</updated>
-      <workItem from="1762247315308" duration="882000" />
+      <workItem from="1762247315308" duration="4379000" />
     </task>
     <servers />
   </component>

+ 6 - 22
Dockerfile

@@ -1,31 +1,15 @@
 FROM python:3.11-slim
 
-# 设置工作目录
 WORKDIR /app
 
-# 复制依赖文件
-COPY requirements.txt .
-COPY mirror_config.txt .
-
-# 设置清华镜像源(加速国内下载)
-RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
-    pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn
-
-# 安装 Python 依赖
-RUN pip install --no-cache-dir -r requirements.txt
-
-# 复制应用程序文件
+# 一次性复制所有文件
 COPY . .
 
-# 创建必要的目录
-RUN mkdir -p templates static
-
-# 暴露 Flask 默认端口
-EXPOSE 5000
+# 设置镜像源
+RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
 
-# 设置环境变量
-ENV FLASK_APP=app.py
-ENV FLASK_ENV=production
+# 安装依赖
+RUN pip install --no-cache-dir -r requirements.txt
 
-# 启动命令
+EXPOSE 5190
 CMD ["python", "app.py"]

+ 1 - 1
docker-compose.yaml

@@ -2,6 +2,6 @@ services:
   wqb-server:
     build: .
     ports:
-      - "5190:5000"
+      - "5190:5190"
     restart: always
     container_name: wqb-server