From d44ed1a54c23a56a723af8e8b398908e82f21685 Mon Sep 17 00:00:00 2001 From: cooder Date: Sun, 3 Mar 2024 10:40:45 +0800 Subject: [PATCH] chore: update docker example --- README.md | 20 ++++++-------------- docker-compose.sqlite.yml | 8 ++++---- docker-compose.yml | 6 +++--- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index ab28eb1..481cfe2 100644 --- a/README.md +++ b/README.md @@ -38,12 +38,8 @@ docker run -d \ --name wewe-rss \ -p 4000:4000 \ - -e DATABASE_URL=file:../data/wewe-rss.db \ -e DATABASE_TYPE=sqlite \ -e AUTH_CODE=123567 \ - -e FEED_MODE=fulltext \ - -e MAX_REQUEST_PER_MINUTE=60 \ - -e SERVER_ORIGIN_URL=http://localhost:4000 \ -v $(pwd)/data:/app/data \ cooderl/wewe-rss-sqlite:latest ``` @@ -77,16 +73,11 @@ docker run -d \ -p 4000:4000 \ -e DATABASE_URL='mysql://root:123456@db:3306/wewe-rss?schema=public&connect_timeout=30&pool_timeout=30&socket_timeout=30' \ -e AUTH_CODE=123567 \ - -e FEED_MODE=fulltext \ - -e MAX_REQUEST_PER_MINUTE=60 \ - -e SERVER_ORIGIN_URL="http://localhost:4000" \ --network wewe-rss \ cooderl/wewe-rss:latest ``` -外网访问时,需将`SERVER_ORIGIN_URL`设置为服务器的公网 IP 或者域名地址 - [Nginx配置参考](https://raw.githubusercontent.com/cooderl/wewe-rss/main/assets/nginx.example.conf) ### 本地部署 @@ -104,13 +95,13 @@ docker run -d \ ## 环境变量 -- `DATABASE_URL` (必填项)数据库地址,例如 `mysql://root:123456@127.0.0.1:3306/wewe-rss`。 +- `AUTH_CODE` (**必填项**)服务端接口请求授权码,(`/feeds`路径不需要)。 -- `DATABASE_TYPE` 数据库类型,使用 `sqlite` 需要填写 `sqlite`。 +- `DATABASE_URL` (**必填项**)数据库地址,例如 `mysql://root:123456@127.0.0.1:3306/wewe-rss`。 -- `AUTH_CODE` (必填项)服务端接口请求授权码,(`/feeds`路径不需要)。 +- `DATABASE_TYPE` 数据库类型,使用 `sqlite` 时需要填写 `sqlite`。 -- `SERVER_ORIGIN_URL` (必填项)服务端访问地址,用于RSS生成时使用。 +- `SERVER_ORIGIN_URL` 服务端访问地址,用于生成RSS的完整路径(外网访问时,设置为服务器的公网 IP 或者域名地址)。 - `MAX_REQUEST_PER_MINUTE` 每分钟最大请求次数,默认 60。 @@ -130,4 +121,5 @@ docker run -d \ 为了确保本项目的持久运行,某些接口请求将通过`weread.111965.xyz`进行转发。请放心,该转发服务不会保存任何数据。 ## License -[MIT](https://raw.githubusercontent.com/cooderl/wewe-rss/main/LICENSE) @cooderl \ No newline at end of file + +[MIT](https://raw.githubusercontent.com/cooderl/wewe-rss/main/LICENSE) @cooderl diff --git a/docker-compose.sqlite.yml b/docker-compose.sqlite.yml index 12dbd5f..cae23c3 100644 --- a/docker-compose.sqlite.yml +++ b/docker-compose.sqlite.yml @@ -7,18 +7,18 @@ services: - 4000:4000 environment: # 数据库连接地址 - - DATABASE_URL=file:../data/wewe-rss.db + # - DATABASE_URL=file:../data/wewe-rss.db - DATABASE_TYPE=sqlite # 服务接口请求授权码 - AUTH_CODE=123567 # 提取全文内容模式 # - FEED_MODE=fulltext # 定时更新订阅源Cron表达式 - - CRON_EXPRESSION=35 5,17 * * * + # - CRON_EXPRESSION=35 5,17 * * * # 服务接口请求限制,每分钟请求次数 - - MAX_REQUEST_PER_MINUTE=60 + # - MAX_REQUEST_PER_MINUTE=60 # 外网访问时,需设置为服务器的公网 IP 或者域名地址 - - SERVER_ORIGIN_URL=http://localhost:4000 + # - SERVER_ORIGIN_URL=http://localhost:4000 volumes: # 映射数据库文件存储位置,容器重启后不丢失 diff --git a/docker-compose.yml b/docker-compose.yml index c4f7ec6..db91d80 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,11 +34,11 @@ services: # 提取全文内容模式 # - FEED_MODE=fulltext # 定时更新订阅源Cron表达式 - - CRON_EXPRESSION=35 5,17 * * * + # - CRON_EXPRESSION=35 5,17 * * * # 服务接口请求限制,每分钟请求次数 - - MAX_REQUEST_PER_MINUTE=60 + # - MAX_REQUEST_PER_MINUTE=60 # 外网访问时,需设置为服务器的公网 IP 或者域名地址 - - SERVER_ORIGIN_URL=http://localhost:4000 + # - SERVER_ORIGIN_URL=http://localhost:4000 networks: wewe-rss: