3v324v23 commited on
Commit
4434b78
·
1 Parent(s): cdaba12

Add database verification and debug output

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -1
Dockerfile CHANGED
@@ -43,8 +43,11 @@ COPY init_sqlite.py .
43
  # 初始化SQLite数据库
44
  RUN python init_sqlite.py
45
 
 
 
 
46
  # 暴露端口
47
  EXPOSE 7860
48
 
49
  # 启动命令(Hugging Face Spaces使用7860端口)
50
- CMD ["uvicorn", "apps.api.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
43
  # 初始化SQLite数据库
44
  RUN python init_sqlite.py
45
 
46
+ # 验证数据库已创建
47
+ RUN ls -lh data/customs_data.db && sqlite3 data/customs_data.db "SELECT COUNT(*) FROM standard_trade_records;"
48
+
49
  # 暴露端口
50
  EXPOSE 7860
51
 
52
  # 启动命令(Hugging Face Spaces使用7860端口)
53
+ CMD ["sh", "-c", "ls -la data/ && uvicorn apps.api.main:app --host 0.0.0.0 --port 7860"]