build(docker): 更新 Docker 配置并修改数据库文件路径
- 修改数据库文件路径为 /data/verify.db - 在 docker-compose.yml 中添加数据卷映射 - 更新 Dockerfile,包含代码克隆、依赖安装和启动命令
This commit is contained in:
parent
b122567c12
commit
9a004a3133
@ -3,7 +3,7 @@ from sqlite3 import Error
|
||||
|
||||
|
||||
class DBService:
|
||||
db_file = "verify.db"
|
||||
db_file = "/data/verify.db"
|
||||
conn = None
|
||||
def __init__(self):
|
||||
"""
|
||||
|
||||
@ -5,5 +5,6 @@ services:
|
||||
container_name: python-app
|
||||
volumes:
|
||||
- ./:/app
|
||||
- ./data:/data
|
||||
ports:
|
||||
- "5555:5555" # 如果需要暴露 Flask 端口
|
||||
|
||||
@ -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"]
|
||||
Loading…
Reference in New Issue
Block a user