Skip to content

Commit

Permalink
Run pre-commit hooks over existing codebase
Browse files Browse the repository at this point in the history
Co-Authored-By: Ben Phelps <[email protected]>
  • Loading branch information
shamoon and benphelps committed Oct 18, 2023
1 parent fa50bba commit 19c2571
Show file tree
Hide file tree
Showing 387 changed files with 4,803 additions and 4,127 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.13.1' # optional
Expand All @@ -57,11 +57,11 @@ jobs:
# https://github.com/marketplace/actions/docker-setup-buildx#with-qemu
- name: Setup QEMU
uses: docker/setup-qemu-action@v3

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3

# This step is being disabled because the runner is on a self-hosted machine
# where the cache will stick between runs.
# - name: Cache Docker layers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Test Docs Build
run: MKINSIDERS=false mkdocs build
deploy:
name: Build & Deploy
name: Build & Deploy
if: github.repository == 'gethomepage/homepage' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
Expand Down
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
13 changes: 11 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Contributing to Homepage

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Reporting a bug
Expand All @@ -8,16 +9,20 @@ We love your input! We want to make contributing to this project as easy and tra
- Becoming a maintainer

## We Develop with Github

We use github to host code, to track issues and feature requests, as well as accept pull requests.

## Any contributions you make will be under the GNU General Public License v3.0

In short, when you submit code changes, your submissions are understood to be under the same [GNU General Public License v3.0](https://choosealicense.com/licenses/gpl-3.0/) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's [issues](https://github.com/gethomepage/homepage/issues)

We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/gethomepage/homepage/issues/new); it's that easy!

## Write bug reports with detail, background, and sample configurations
Homepage includes a lot of configuration options and is often deploying in larger systems. Please include as much information (configurations, deployment method, Docker & API versions, etc) as you can when reporting an issue.

Homepage includes a lot of configuration options and is often deploying in larger systems. Please include as much information (configurations, deployment method, Docker & API versions, etc) as you can when reporting an issue.

**Great Bug Reports** tend to have:

Expand All @@ -29,16 +34,20 @@ Homepage includes a lot of configuration options and is often deploying in large
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

People *love* thorough bug reports. I'm not even kidding.
People _love_ thorough bug reports. I'm not even kidding.

## Development Guidelines

Please see the [documentation regarding development](https://gethomepage.dev/latest/more/development/) and specifically the [guidelines for new service widgets](https://gethomepage.dev/latest/more/development/#service-widget-guidelines) if you are considering making one.

## Use a Consistent Coding Style

This project follows the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript), please follow it when submitting pull requests.

## License

By contributing, you agree that your contributions will be licensed under its GNU General Public License.

## References

This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/main/CONTRIBUTING.md)
20 changes: 10 additions & 10 deletions docs/configs/bookmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ By default, the description will use the hostname of the link, but you can overr

```yaml
- Developer:
- Github:
- abbr: GH
href: https://github.com/
- Github:
- abbr: GH
href: https://github.com/

- Social:
- Reddit:
- icon: reddit.png
href: https://reddit.com/
description: The front page of the internet
- Reddit:
- icon: reddit.png
href: https://reddit.com/
description: The front page of the internet

- Entertainment:
- YouTube:
- abbr: YT
href: https://youtube.com/
- YouTube:
- abbr: YT
href: https://youtube.com/
```

<img width="1000" alt="Bookmarks" src="https://user-images.githubusercontent.com/19408/269307009-d7e45885-230f-4e07-b421-9822017ae878.png">
150 changes: 75 additions & 75 deletions docs/configs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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`.
Expand All @@ -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
Expand All @@ -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:https://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:https://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.**
Expand All @@ -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:https://emby.home/
- homepage.description=Media server
- homepage.widget.type=emby
- homepage.widget.url=http:https://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:https://emby.home/
- homepage.description=Media server
- homepage.widget.type=emby
- homepage.widget.url=http:https://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:https://emby.home/
- homepage.description=Media server
- homepage.widget.type=customapi
- homepage.widget.url=http:https://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:https://emby.home/
- homepage.description=Media server
- homepage.widget.type=customapi
- homepage.widget.url=http:https://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
Expand All @@ -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.
Expand Down Expand Up @@ -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

Expand Down
Loading

0 comments on commit 19c2571

Please sign in to comment.