diff --git a/alibabacloud_sample/dbservice.py b/alibabacloud_sample/dbservice.py index ec78d8a..e313704 100644 --- a/alibabacloud_sample/dbservice.py +++ b/alibabacloud_sample/dbservice.py @@ -3,7 +3,7 @@ from sqlite3 import Error class DBService: - db_file = "verify.db" + db_file = "/data/verify.db" conn = None def __init__(self): """ diff --git a/docker-compose.yml b/docker-compose.yml index 8a51e9e..3640394 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,5 +5,6 @@ services: container_name: python-app volumes: - ./:/app + - ./data:/data ports: - "5555:5555" # 如果需要暴露 Flask 端口 diff --git a/dockerfile b/dockerfile index 79299de..108ca25 100644 --- a/dockerfile +++ b/dockerfile @@ -1,5 +1,10 @@ FROM python:latest -WORKDIR /app -RUN pip install --no-cache-dir -r requirements.txt +WORKDIR /app +RUN git clone http://192.168.1.68:8418/jayus/VerifVATInvoice.git . +COPY . . +RUN pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple + RUN python setup.py install +WORKDIR /app/alibabacloud_sample +CMD ["python", "main.py"] \ No newline at end of file