@@ -19,9 +19,6 @@ ENV PATH="/root/.local/bin:${PATH}"
# 复制项目文件
COPY . /app
-# 安装uv依赖
-RUN uv sync --frozen -i https://mirrors.aliyun.com/pypi/simple/
-
# 暴露服务端口(FastAPI 默认 5344)
EXPOSE 5344
@@ -0,0 +1,14 @@
+services:
+ sorawm_server:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ image: sorawm_server:prod
+ container_name: sorawm_server
+ working_dir: /app
+ ports:
+ - "5344:5344"
+ - "8503:8503"
+ volumes:
+ - .:/app
+ command: /app/sorawm_start.sh
@@ -1,7 +1,12 @@
#!/bin/bash
+# 安装uv依赖
+uv sync --frozen -i https://mirrors.aliyun.com/pypi/simple/
+
+# 激活环境
source /app/.venv/bin/activate
+# 启动服务
uv run streamlit run app.py --server.port 8503 --server.headless true --browser.gatherUsageStats false &
uv run python start_server.py --host 0.0.0.0 --port 5344 &