3.18 增加dockerfil

This commit is contained in:
zhangsan 2025-03-18 18:30:00 +08:00
parent f7f099a50e
commit b50458dabb
3 changed files with 16 additions and 15 deletions

15
Dockerfile Normal file
View File

@ -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"]

View File

@ -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_'

View File

@ -1,3 +1,4 @@
#main.py
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import logging