mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-06 07:22:07 +08:00
Run pre-commit hooks over existing codebase
Co-Authored-By: Ben Phelps <ben@phelps.io>
This commit is contained in:
@@ -9,8 +9,8 @@ For IP:PORT, simply make sure your Docker instance [has been configured](https:/
|
||||
|
||||
```yaml
|
||||
my-remote-docker:
|
||||
host: 192.168.0.101
|
||||
port: 2375
|
||||
host: 192.168.0.101
|
||||
port: 2375
|
||||
```
|
||||
|
||||
## Using Docker TLS
|
||||
@@ -19,12 +19,12 @@ Since Docker supports connecting with TLS and client certificate authentication,
|
||||
|
||||
```yaml
|
||||
my-remote-docker:
|
||||
host: 192.168.0.101
|
||||
port: 275
|
||||
tls:
|
||||
keyFile: tls/key.pem
|
||||
caFile: tls/ca.pem
|
||||
certFile: tls/cert.pem
|
||||
host: 192.168.0.101
|
||||
port: 275
|
||||
tls:
|
||||
keyFile: tls/key.pem
|
||||
caFile: tls/ca.pem
|
||||
certFile: tls/cert.pem
|
||||
```
|
||||
|
||||
## Using Docker Socket Proxy
|
||||
@@ -35,35 +35,35 @@ Here is an example docker-compose file that will expose the docker socket, and t
|
||||
|
||||
```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
|
||||
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
|
||||
image: ghcr.io/gethomepage/homepage:latest
|
||||
container_name: homepage
|
||||
volumes:
|
||||
- /path/to/config:/app/config
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
Then, inside of your `docker.yaml` settings file, you'd configure the docker instance like so:
|
||||
|
||||
```yaml
|
||||
my-docker:
|
||||
host: dockerproxy
|
||||
port: 2375
|
||||
host: dockerproxy
|
||||
port: 2375
|
||||
```
|
||||
|
||||
## Using Socket Directly
|
||||
@@ -76,14 +76,14 @@ If you'd rather use the socket directly, first make sure that you're passing the
|
||||
|
||||
```yaml
|
||||
homepage:
|
||||
image: ghcr.io/gethomepage/homepage:latest
|
||||
container_name: homepage
|
||||
volumes:
|
||||
- /path/to/config:/app/config
|
||||
- /var/run/docker.sock:/var/run/docker.sock # pass local proxy
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: unless-stopped
|
||||
image: ghcr.io/gethomepage/homepage:latest
|
||||
container_name: homepage
|
||||
volumes:
|
||||
- /path/to/config:/app/config
|
||||
- /var/run/docker.sock:/var/run/docker.sock # pass local proxy
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
If you're using `docker run`, this would be `-v /var/run/docker.sock:/var/run/docker.sock`.
|
||||
@@ -92,7 +92,7 @@ Then, inside of your `docker.yaml` settings file, you'd configure the docker ins
|
||||
|
||||
```yaml
|
||||
my-docker:
|
||||
socket: /var/run/docker.sock
|
||||
socket: /var/run/docker.sock
|
||||
```
|
||||
|
||||
## Services
|
||||
@@ -118,18 +118,18 @@ Below is an example of the same service entry shown above, as docker labels.
|
||||
|
||||
```yaml
|
||||
services:
|
||||
emby:
|
||||
image: lscr.io/linuxserver/emby:latest
|
||||
container_name: emby
|
||||
ports:
|
||||
- 8096:8096
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- homepage.group=Media
|
||||
- homepage.name=Emby
|
||||
- homepage.icon=emby.png
|
||||
- homepage.href=http://emby.home/
|
||||
- homepage.description=Media server
|
||||
emby:
|
||||
image: lscr.io/linuxserver/emby:latest
|
||||
container_name: emby
|
||||
ports:
|
||||
- 8096:8096
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- homepage.group=Media
|
||||
- homepage.name=Emby
|
||||
- homepage.icon=emby.png
|
||||
- homepage.href=http://emby.home/
|
||||
- homepage.description=Media server
|
||||
```
|
||||
|
||||
When your Docker instance has been properly configured, this service will be automatically discovered and added to your Homepage. **You do not need to specify the `server` or `container` values, as they will be automatically inferred.**
|
||||
@@ -142,32 +142,32 @@ You may also configure widgets, along with the standard service entry, again, us
|
||||
|
||||
```yaml
|
||||
labels:
|
||||
- homepage.group=Media
|
||||
- homepage.name=Emby
|
||||
- homepage.icon=emby.png
|
||||
- homepage.href=http://emby.home/
|
||||
- homepage.description=Media server
|
||||
- homepage.widget.type=emby
|
||||
- homepage.widget.url=http://emby.home
|
||||
- homepage.widget.key=yourembyapikeyhere
|
||||
- homepage.widget.fields=["field1","field2"] # optional
|
||||
- homepage.group=Media
|
||||
- homepage.name=Emby
|
||||
- homepage.icon=emby.png
|
||||
- homepage.href=http://emby.home/
|
||||
- homepage.description=Media server
|
||||
- homepage.widget.type=emby
|
||||
- homepage.widget.url=http://emby.home
|
||||
- homepage.widget.key=yourembyapikeyhere
|
||||
- homepage.widget.fields=["field1","field2"] # optional
|
||||
```
|
||||
|
||||
You can add specify fields for e.g. the [CustomAPI](/widgets/services/customapi) widget by using array-style dot notation:
|
||||
|
||||
```yaml
|
||||
labels:
|
||||
- homepage.group=Media
|
||||
- homepage.name=Emby
|
||||
- homepage.icon=emby.png
|
||||
- homepage.href=http://emby.home/
|
||||
- homepage.description=Media server
|
||||
- homepage.widget.type=customapi
|
||||
- homepage.widget.url=http://argus.service/api/v1/service/summary/emby
|
||||
- homepage.widget.field[0].label=Deployed Version
|
||||
- homepage.widget.field[0].field.status=deployed_version
|
||||
- homepage.widget.field[1].label=Latest Version
|
||||
- homepage.widget.field[1].field.status=latest_version
|
||||
- homepage.group=Media
|
||||
- homepage.name=Emby
|
||||
- homepage.icon=emby.png
|
||||
- homepage.href=http://emby.home/
|
||||
- homepage.description=Media server
|
||||
- homepage.widget.type=customapi
|
||||
- homepage.widget.url=http://argus.service/api/v1/service/summary/emby
|
||||
- homepage.widget.field[0].label=Deployed Version
|
||||
- homepage.widget.field[0].field.status=deployed_version
|
||||
- homepage.widget.field[1].label=Latest Version
|
||||
- homepage.widget.field[1].field.status=latest_version
|
||||
```
|
||||
|
||||
## Docker Swarm
|
||||
@@ -176,8 +176,8 @@ Docker swarm is supported and Docker services are specified with the same `serve
|
||||
|
||||
```yaml
|
||||
my-docker:
|
||||
socket: /var/run/docker.sock
|
||||
swarm: true
|
||||
socket: /var/run/docker.sock
|
||||
swarm: true
|
||||
```
|
||||
|
||||
For the automatic service discovery to discover all services it is important that homepage should be deployed on a manager node. Set deploy requirements to the master node in your stack yaml config, e.g.
|
||||
@@ -205,9 +205,9 @@ In order to detect every service within the Docker swarm it is necessary that se
|
||||
|
||||
As of v0.6.4 discovered services can include an optional `weight` field to determine sorting such that:
|
||||
|
||||
- Default weight for discovered services is 0
|
||||
- Default weight for configured services is their index within their group scaled by 100, i.e. (index + 1) \* 100
|
||||
- If two items have the same weight value, then they will be sorted by name
|
||||
- Default weight for discovered services is 0
|
||||
- Default weight for configured services is their index within their group scaled by 100, i.e. (index + 1) \* 100
|
||||
- If two items have the same weight value, then they will be sorted by name
|
||||
|
||||
## Show stats
|
||||
|
||||
|
||||
Reference in New Issue
Block a user