基础的部署只会使用默认的配置文件,如果想要个人定制的话需要按照个人需求对配置文件进行修改或者查看进阶配置教程【HomePage】 - 实用的个人主页(二)

使用
docker-compose进行部署
id <用户名> 获取id <用户名> 获取nas@CarolHomeNas:~$ id nas
uid=1026(nas) gid=100(users) groups=100(users),101(administrators)
version: "3.3"
services:
homepage:
image: ghcr.io/gethomepage/homepage:v0.7.4
container_name: homepage
ports:
- 3000:3000
deploy:
resources:
limits:
cpus: 'lower'
memory: 1G
volumes:
- ./config:/app/config
- ./logs:/logs
- ./icons:/app/public/icons
- ./images:/app/public/images
- /volume2:/volume2:ro
- /var/run/docker.sock:/var/run/docker.sock
environment:
- PUID=1026
- PGID=100
restart: always
更多详细配置信息内容可查看官方文档
系统配置文件,可用于配置页面标题、图标等信息
services.yaml 中的布局,无法控制 bookmarks.yaml---
# For configuration options and examples, please see:
# https://gethomepage.dev/en/configs/settings
title: Carol Homepage
language: zh-CN
# background: https://images.unsplash.com/photo-1502790671504-542ad42d5189?auto=format&fit=crop&w=2560&q=80
background:
image: https://images.unsplash.com/photo-1502790671504-542ad42d5189?auto=format&fit=crop&w=2560&q=80
blur: "" # sm, "", md, xl... see https://tailwindcss.com/docs/backdrop-blur
saturate: 50 # 0, 50, 100... see https://tailwindcss.com/docs/backdrop-saturate
brightness: 75 # 0, 50, 75... see https://tailwindcss.com/docs/backdrop-brightness
opacity: 100 # 0-100
favicon: /image/logo.png
theme: dark
providers:
openweathermap: openweathermapapikey
weatherapi: weatherapiapikey
logpath: /
fiveColumns: true
quicklaunch:
searchDescriptions: true
hideInternetSearch: true
hideVisitURL: true
hideVersion: true
layout:
Monitor:
style: row
columns: 2
Synology:
style: row
columns: 4
Services:
style: row
columns: 4
Self:
style: row
columns: 4
标签栏,单纯用于保存标签信息,无法设置
ping和布局
icon 则显示该项内容.png 文件并且重启容器- Synology:
- 管理面板:
- abbr: DSM
href: https://x.x.x.x/
icon: synology-dsm.png
- NASTOOL:
- abbr: NT
href: https://x.x.x.x/
icon: /images/nastool.png
服务组页面,可以设置
ping和小组件的实时监听
目前支持的小组件实时监听列表请查看: 支持列表
本页的布局可以通过相同的组名在
settings.yaml中的layout进行控制
需要注意的是如果配置
widget则需要查看官方文档对应的组件的配置方式,每个组件的widget配置内容都可能不一样
settings.yaml 中的 layout 进行控制组布局---
# For configuration options and examples, please see:
# https://gethomepage.dev/en/configs/services
# https://github.com/walkxcode/Dashboard-Icons
- Monitor:
- UptimeKuma:
icon: uptime-kuma.png
href: "https://x.x.x.x/"
description: 服务健康监控
ping: https://x.x.x.x/
widget:
type: uptimekuma
url: https://x.x.x.x/
slug: monitor
- Transmission:
icon: transmission.png
href: "https://x.x.x.x/"
description: 下载服务器
ping: https://x.x.x.x/
widget:
type: transmission
url: https://x.x.x.x/
username: test
password: password
- Synology:
- 虚拟化控制中心:
icon: /images/synology-vmm.png
href: "https://x.x.x.x/"
- Services:
- Nastool:
icon: /images/nastool.png
href: "https://x.x.x.x/"
ping: https://x.x.x.x/
- 导航页:
icon: homepage.png
href: "https://x.x.x.x/"
# ping: https://x.x.x.x/
集群配置信息,个人用户通常不需要进行配置
如果需要配置请查看官方文档: kubernetes.yaml
- Emby:
icon: emby.png
href: "http://emby.home/"
description: Media server
namespace: media # The kubernetes namespace the app resides in
app: emby # The name of the deployed app
容器监听页面,需要在
docker-compose.yaml部署的时候加上下面的配置,链接的本地docker.sock地址根据实际地址进行配置
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
具体配置信息可以查看文档: docker.yaml
dockerproxy:
image: ghcr.io/tecnativa/docker-socket-proxy:latest
container_name: dockerproxy
environment:
- CONTAINERS=1 # Allow access to viewing containers
- SERVICES=1 # Allow access to viewing services (necessary when using Docker Swarm)
- TASKS=1 # Allow access to viewing tasks (necessary when using Docker Swarm)
- POST=0 # Disallow any POST operations (effectively read-only)
ports:
- 127.0.0.1:2375:2375
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Mounted as read-only
restart: unless-stopped
homepage:
image: ghcr.io/gethomepage/homepage:latest
container_name: homepage
volumes:
- /path/to/config:/app/config
ports:
- 3000:3000
restart: unless-stopped
页眉位置小组件,例如日期、搜索框、磁盘监控等
docker-compose.yaml 中 - volumes 配置磁盘路径并且在 widgets.yaml 中的 resources - disk 配置相应路径bing DuckDuckgo google baidu 等---
# For configuration options and examples, please see:
# https://gethomepage.dev/en/configs/widgets
- logo:
icon: https://x.x.x.x/logo.png
- resources:
cpu: true
memory: true
# label: Storage
expanded: true
disk:
- /
- /volume2
- search:
provider: bing
target: _blank
focus: true
- datetime:
text_size: x1
format:
dateStyle: short
timeStyle: short
hour12: false