feat: initial MVP - FastAPI backend + Vue3 frontend + docker-compose
- backend: FastAPI + SQLAlchemy 2.0(async) + asyncpg + Alembic - 7 API routes: auth/me/articles/sources/bookmarks/subscriptions/admin - models: User/Source/Article/Bookmark/Subscription/ApiToken - services: RSS fetcher (feedparser) + Tencent TMT translator with quota + cache + local NLLB fallback - workers: APScheduler + asyncio pipeline (fetch -> dedupe -> insert -> translate) - seed scripts: create_user, seed_sources (5 RSS: Reuters/BBC/Al Jazeera/NHK/DW) - frontend: Vue 3 + Vite + Naive UI + Pinia + vue-router - pages: Login, Feed (24h), ArticleDetail, Sources, Bookmarks, AdminSources - deploy: docker-compose (postgres/redis/api/worker/frontend/caddy) - docs: README, DEPLOY, architecture, acceptance
This commit is contained in:
32
Caddyfile
Normal file
32
Caddyfile
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
# 全局选项
|
||||
auto_https off
|
||||
admin off
|
||||
log {
|
||||
level info
|
||||
output stdout
|
||||
}
|
||||
}
|
||||
|
||||
# 如果 DOMAIN 为空,直接走 80 端口 HTTP(自签证书后面再补)
|
||||
# 如果有域名,改用下面的 https 配置块
|
||||
|
||||
http://{$DOMAIN:NEWS_DOMAIN_FALLBACK} {
|
||||
reverse_proxy /api/* api:8000
|
||||
reverse_proxy /* frontend:80
|
||||
|
||||
encode gzip zstd
|
||||
|
||||
# 日志
|
||||
log {
|
||||
output stdout
|
||||
format console
|
||||
}
|
||||
}
|
||||
|
||||
# 如果有域名,启用自动 HTTPS(取消下面注释,并把上面块注释)
|
||||
# {$DOMAIN} {
|
||||
# reverse_proxy /api/* api:8000
|
||||
# reverse_proxy /* frontend:80
|
||||
# encode gzip zstd
|
||||
# }
|
||||
Reference in New Issue
Block a user