-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs with community requested changes and bump version
- Loading branch information
Showing
7 changed files
with
103 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "cup" | ||
version = "2.2.1" | ||
version = "2.2.2" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Docker Compose | ||
|
||
Many users find it useful to run Cup with Docker Compose, as it enables them to have it constantly running in the background and easily control it. Cup's lightweight resource usae makes it ideal for this use case. | ||
|
||
There have been requests for an official Docker Compose file, but I believe you should customize it to your needs. | ||
|
||
Here is an example of what I would use (by [@ioverho](https://github.com/ioverho)): | ||
|
||
```yaml | ||
services: | ||
cup: | ||
image: ghcr.io/sergi0g/cup:latest | ||
container_name: cup # Optional | ||
restart: unless-stopped | ||
command: -c /config/cup.json serve | ||
ports: | ||
- 8000:8000 | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- ./cup.json:/config/cup.json | ||
``` | ||
This can be customized further of course, if you choose to use a different port, another config location, or would like to change something else. Have fun! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import Image from 'next/image'; | ||
import widget1 from '../../../assets/350767810-42eccc89-bdfd-426a-a113-653abe7483d8.png' | ||
import widget2 from '../../../assets/358304960-e9f26767-51f7-4b5a-8b74-a5811019497b.jpeg' | ||
|
||
# Homepage Widget | ||
|
||
Some users have asked for a homepage widget. | ||
|
||
## Docker Compose with the widget configured via labels: | ||
|
||
```yaml | ||
services: | ||
cup: | ||
image: ghcr.io/sergi0g/cup | ||
container_name: cup | ||
command: -c /config/cup.json serve -p 8000 | ||
volumes: | ||
- ./config/cup.json:/config/cup.json | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
ports: | ||
- 8000:8000 | ||
restart: unless-stopped | ||
labels: | ||
homepage.group: Network | ||
homepage.name: Cup | ||
homepage.icon: /icons/cup-with-straw.png | ||
homepage.href: http://myserver:8000 | ||
homepage.ping: http://myserver:8000 | ||
homepage.description: Checks for container updates | ||
homepage.widget.type: customapi | ||
homepage.widget.url: http://myserver:8000/json | ||
homepage.widget.mappings[0].label: Monitoring | ||
homepage.widget.mappings[0].field.metrics: monitored_images | ||
homepage.widget.mappings[0].format: number | ||
homepage.widget.mappings[1].label: Up to date | ||
homepage.widget.mappings[1].field.metrics: up_to_date | ||
homepage.widget.mappings[1].format: number | ||
homepage.widget.mappings[2].label: Updates | ||
homepage.widget.mappings[2].field.metrics: update_available | ||
homepage.widget.mappings[2].format: number | ||
``` | ||
Preview: | ||
<Image src={widget1}/> | ||
Credit: [@agrmohit](https://github.com/agrmohit) | ||
## Widget in Homepage's config file format: | ||
```yaml | ||
widget: | ||
type: customapi | ||
url: http://<SERVER_IP>:9000/json | ||
refreshInterval: 10000 | ||
method: GET | ||
mappings: | ||
- field: | ||
metrics: monitored_images | ||
label: Monitored images | ||
format: number | ||
- field: | ||
metrics: up_to_date | ||
label: Up to date | ||
format: number | ||
- field: | ||
metrics: update_available | ||
label: Available updates | ||
format: number | ||
- field: | ||
metrics: unknown | ||
label: Unknown | ||
format: number | ||
``` | ||
Preview: | ||
<Image src={widget2}/> | ||
Credit: [@remussamoila](https://github.com/remussamoila) |