1.安装docker

curl -fsSL https://get.docker.com | sudo bash -s docker && sudo systemctl enable --now docker

2.安装 docker-compose

sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose

3.安装TTR

#创建 ttrss 目录并进入
mkdir ttrss && cd ttrss
#利用 curl 下载 ttrss 的 docker-compose 配置文件至服务器
curl -fLo docker-compose.yml https://raw.githubusercontent.com/HenryQW/Awesome-TTRSS/main/docker-compose.yml

#修改访问域名,如果加了SSl注意写https
vi docker-compose.yml
#退出编辑模式
:wq

#安装TTR并后台运行
docker-compose up -d

4.域名反代
如果是宝塔面板的话,直接反代181端口,反代配置文件参考如下:

#PROXY-START/

location ^~ /
{
    proxy_pass http://127.0.0.1:181;
     proxy_set_header  Host     $http_host;
     proxy_set_header  X-Real-IP    $remote_addr;
     proxy_set_header  X-Forwarded-Ssl   on;
     proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
     proxy_set_header  X-Forwarded-Proto   $scheme;
     proxy_set_header  X-Frame-Options     SAMEORIGIN;
    # proxy_hide_header Upgrade;

    add_header X-Cache $upstream_cache_status;

    #Set Nginx Cache
    
    
    set $static_fileSfpGgqu4 0;
    if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
    {
        set $static_fileSfpGgqu4 1;
        expires 1m;
        }
    if ( $static_fileSfpGgqu4 = 0 )
    {
    add_header Cache-Control no-cache;
    }
}

#PROXY-END/

至此可以访问了,默认用户名admin 密码password
如果需要自定义修改相关文字logo等等,可以直接在容器里修改
5.查看容器ID:XXXX

docker ps -a

6.进入容器:

docker exec -it XXXX /bin/sh

7.自定义修改,实时生效

#访问页面修改
vi index.php
#网站图标修改
cd images
#修改 favicon.png 
#内容标题修改
cd js
vi App.js
#其他修改等等

8.退出容器
Ctrl+D 退出容器

Last modification:March 29, 2024
If you think my article is useful to you, please feel free to appreciate