chenzerong commited on
Commit
d3b6935
·
1 Parent(s): 6dbca12
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -22,11 +22,12 @@ COPY ./service.py /code/service.py
22
  COPY ./templates /code/templates/
23
  COPY ./static /code/static/
24
 
25
- # 尝试复制.env文件(如果存在)
26
- COPY ["./.env", "/code/.env"]
27
-
28
  # 创建必要的目录
29
- RUN mkdir -p /code/static/uploads
 
 
 
 
30
 
31
  # 创建启动脚本
32
  RUN echo '#!/bin/bash\n\
 
22
  COPY ./templates /code/templates/
23
  COPY ./static /code/static/
24
 
 
 
 
25
  # 创建必要的目录
26
+ RUN mkdir -p /code/static/uploads && \
27
+ touch /code/.env
28
+
29
+ # 尝试复制.env文件(如果存在)
30
+ RUN if [ -f .env ]; then cp .env /code/.env; fi
31
 
32
  # 创建启动脚本
33
  RUN echo '#!/bin/bash\n\