Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .coverage
Binary file not shown.
58 changes: 24 additions & 34 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,40 +1,30 @@
# PythonDL环境变量配置

# MySQL配置
MYSQL_ROOT_PASSWORD=root123456
MYSQL_DATABASE=pythondl
MYSQL_USER=pythondl
MYSQL_PASSWORD=pythondl123

# Redis配置
REDIS_PASSWORD=

# Elasticsearch配置
ELASTICSEARCH_PASSWORD=

# Grafana配置
GRAFANA_USER=admin
GRAFANA_PASSWORD=admin

# 应用配置
APP_ENV=production
APP_DEBUG=false
SECRET_KEY=your-secret-key-change-this-in-production

# 数据库配置
DATABASE_URL=mysql+mysqlconnector://pythondl:pythondl123@mysql:3306/pythondl

# Redis配置
REDIS_URL=redis://redis:6379/0
DATABASE_URL=mysql+pymysql://python:123456@127.0.0.1:3306/py_demo
DATABASE_ECHO=false

# Redis 配置
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=123456
REDIS_DB=0
REDIS_URL=redis://:123456@127.0.0.1:6379/0

# 安全配置
SECRET_KEY=your-secret-key-change-in-production
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
REFRESH_TOKEN_EXPIRE_DAYS=7

# Elasticsearch配置
ELASTICSEARCH_URL=http://elasticsearch:9200
# 应用配置
DEBUG=true
ENVIRONMENT=development
APP_NAME=PythonDL
APP_VERSION=1.0.0

# 日志配置
LOG_LEVEL=INFO
LOG_DIR=logs

# 缓存配置
CACHE_TTL=3600

# 文件上传配置
MAX_UPLOAD_SIZE=104857600
# 服务器配置
HOST=127.0.0.1
PORT=8009
92 changes: 55 additions & 37 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,41 +1,27 @@
dist
./.venv
./venv
./venv/*
.python-version
.idea

config

# 日志文件
logs/*.log
logs/*.log.*

# 缓存文件
runtimes/cache/*
runtimes/sessions/*
!runtimes/.gitkeep

# 临时文件
temps/*
!temps/.gitkeep

# 数据文件
data/*
!data/.gitkeep

# 导出文件
files/exports/*
files/images/*
files/videos/*
!files/.gitkeep

# Python 缓存
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
venv/
ENV/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# 环境变量
.env
Expand All @@ -49,11 +35,43 @@ __pycache__/
*.swo
*~

# 操作系统
.DS_Store
Thumbs.db
# 日志文件
logs/*
!logs/.gitkeep

# 缓存文件
runtimes/*
!runtimes/.gitkeep

# 临时文件
temps/*
!temps/.gitkeep

# 数据文件
data/*
!data/.gitkeep

# 导出文件
files/*
!files/.gitkeep

# 数据库
*.db
*.sqlite
*.sqlite3
*.sqlite3

# OS
.DS_Store
Thumbs.db

files/*
runtimes/*
temps/*
tests/*
logs/*
.venv/
.pytest_cache/
.mypy_cache/
.lingma/
.idea/
data/*
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
Loading
Loading