[Docker] Flare 个人导航页面
轻量、快速、美观的个人导航页面,适用于 HomeLab 或其他注重私密的场景。
Github:https://github.com/soulteary/docker-flare
原作者博客:从零开始搭建个人书签导航应用:Flare
主要特点:
性能优势:与其前身 Flame 相比,Flare 在性能方面有着明显的优势。无论是小到 10M 的容器镜像体积、还是平时仅消耗 30M 左右的内存,Flare 均能在 99% 的情况下实现页面秒开,且在极限情况下内存使用仍然保持在 60M。
数据策略简单透明:Flare 使用文本格式来存储书签数据,保证了数据的持久性和透明性。无论是软件在未来的某一天无法运行,还是用户希望切换到其他工具,数据迁移的成本都很低。
美观界面:Flare 提供了一致性的书签图标设计,内置 Material Design Icons 6k+ 图标,确保了软件界面的美观性。
懒人工具:Flare 内置了一个图标快速选择工具,以及简单易用的天气展示功能,减少了用户的操作成本。
在线编辑:为了满足用户随时随地的编辑需求,Flare 在最新版本中添加了在线编辑功能。
部署环境
- 系统:Debian
- 域名一个,并解析到服务器
- 安装好 Docker、Docker-compose,见VPS部署
- 安装好 Caddy,反向代理
部署
升级 packages,
apt update -y
安装常用的软件,
apt install wget curl sudo vim git
flare
创建安装目录,
mkdir -p /root/data/docker/flare
cd /root/data/docker/flare
下载 docker-compose.yml
,
wget https://raw.githubusercontent.com/soulteary/docker-flare/main/docker-compose.yml
根据需求和配置说明修改配置环境变量,
version: '3.6'
services:
flare:
image: soulteary/flare
restart: always
# 默认无需添加任何参数,如有特殊需求
# 可阅读文档 https://github.com/soulteary/docker-flare/blob/main/docs/advanced-startup.md
# command: flare
# 启用账号登陆模式
command: flare --nologin=0
environment:
# 如需开启用户登陆模式,需要先设置 `nologin` 启动参数为 `0`
# 如开启 `nologin`,未设置 FLARE_USER,则默认用户为 `flare`
- FLARE_USER=amaranth
# 指定你自己的账号密码,如未设置 `FLARE_USER`,则会默认生成密码并展示在应用启动日志中
- FLARE_PASS=271828
# 是否开启“使用向导”,访问 `/guide`
- FLARE_GUIDE=1
ports:
- 5005:5005
volumes:
- ./app:/app
如果你有更私密的要求,还可以使用
flare --disable_login=0 --visibility=private
设置首页内容必须登录能够看到。
启动,
docker-compose up -d
更新
进入 docker-compose.yml
所在的文件夹,
cd /root/data/docker/flare
拉取最新的镜像,
docker-compose pull
重新更新当前镜像,
docker-compose up -d
卸载
进入 docker-compose 所在的文件夹,
cd /root/data/docker/flare
停止容器,此时不会删除映射到本地的数据,
docker-compose down
完全删除映射到本地的数据,
cd
rm -rf /root/data/docker/flare
反向代理
进入目录 /etc/caddy/sites
,创建并编辑 amaranthinking.eu.org.conf
,
# Uncomment this in addition with the import admin_redir statement allow access to the admin interface only from local networks
# (admin_redir) {
# @admin {
# path /admin*
# not remote_ip private_ranges
# }
# redir @admin /
# }
amaranthinking.eu.org {
log {
level INFO
output file /root/data/docker/flare/flare.log {
roll_size 10MB
roll_keep 10
}
}
# Uncomment this if you want to get a cert via ACME (Let's Encrypt or ZeroSSL).
# tls {$EMAIL}
# Or uncomment this if you're providing your own cert. You would also use this option
# if you're running behind Cloudflare.
# tls {$SSL_CERT_PATH} {$SSL_KEY_PATH}
# This setting may have compatibility issues with some browsers
# (e.g., attachment downloading on Firefox). Try disabling this
# if you encounter issues.
encode gzip
# Uncomment to improve security (WARNING: only use if you understand the implications!)
# If you want to use FIDO2 WebAuthn, set X-Frame-Options to "SAMEORIGIN" or the Browser will block those requests
header {
# Enable HTTP Strict Transport Security (HSTS)
Strict-Transport-Security "max-age=31536000;"
# Enable cross-site filter (XSS) and tell browser to block detected attacks
X-XSS-Protection "1; mode=block"
# Disallow the site to be rendered within a frame (clickjacking protection)
X-Frame-Options "SAMEORIGIN"
# Prevent search engines from indexing (optional)
X-Robots-Tag "none"
# Server name removing
-Server
}
# Uncomment to allow access to the admin interface only from local networks
# import admin_redir
# Proxy everything to Rocket
reverse_proxy 127.0.0.1:5005 {
# Send the true remote IP to Rocket, so that it can put this in the
# log, so that fail2ban can ban the correct IP.
header_up X-Real-IP {remote_host}
}
}
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
评论已关闭