diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3302bb5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# 使用一个轻量的 Python 镜像 +FROM python:3.8-slim + +# 设置工作目录 +WORKDIR /markdown_operation + +# 复制 requirements.txt 并安装依赖 +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +# 复制整个项目到容器内 +COPY . . + +# 设置容器启动时运行的命令,比如运行 main.py +CMD ["/bin/bash"] diff --git a/typecho_markdown_upload/config.py.example b/typecho_markdown_upload/config.py.example deleted file mode 100644 index 1e5f3a9..0000000 --- a/typecho_markdown_upload/config.py.example +++ /dev/null @@ -1,15 +0,0 @@ -base_folder = 'D:/Notes/' -exclude_folders = ['工作笔记'] - -# typecho config -website_xmlrpc_url = '' # https://www.abc.com/index.php/action/xmlrpc -website_username = 'xxx' -website_password = 'xxx' - -# mysql config -mysql_host = 'localhost' -mysql_port = 3306 -mysql_username = 'xxx' -mysql_password = 'xxx' -mysql_typecho_database = 'typecho' -mysql_typecho_table_prefix = 'typecho_' \ No newline at end of file diff --git a/typecho_markdown_upload/main.py b/typecho_markdown_upload/main.py index 1f9e5c7..36f5cf5 100644 --- a/typecho_markdown_upload/main.py +++ b/typecho_markdown_upload/main.py @@ -1,3 +1,4 @@ +#main.py #!/usr/bin/python # -*- coding: UTF-8 -*- import logging