mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-16 17:13:46 -05:00
Start updating docs
Some checks failed
Deploy github pages / build (push) Has been cancelled
Deploy github pages / deploy (push) Has been cancelled
Some checks failed
Deploy github pages / build (push) Has been cancelled
Deploy github pages / deploy (push) Has been cancelled
This commit is contained in:
@@ -57,7 +57,6 @@ export function Home() {
|
||||
<div className="*:-0 mt-auto grid w-fit grid-cols-2 gap-4 *:flex *:items-center *:gap-2 *:rounded-lg *:px-3 *:py-2">
|
||||
<a
|
||||
href="/docs"
|
||||
target="_blank"
|
||||
className="hide-focus group h-full bg-black text-white dark:bg-white dark:text-black"
|
||||
>
|
||||
Get started
|
||||
|
||||
@@ -20,8 +20,8 @@ class DocumentProMax extends Document {
|
||||
sizes="180x180"
|
||||
href="/apple-touch-icon.png"
|
||||
/>
|
||||
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
||||
<meta
|
||||
name="theme-color"
|
||||
media="(prefers-color-scheme: light)"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
},
|
||||
"index": {
|
||||
"type": "page",
|
||||
"title": "Cup",
|
||||
"title": "Cup - The easiest way to manage your container updates",
|
||||
"display": "hidden",
|
||||
"theme": {
|
||||
"layout": "raw"
|
||||
|
||||
@@ -28,7 +28,7 @@ services:
|
||||
homepage.ping: http://myserver:8000
|
||||
homepage.description: Checks for container updates
|
||||
homepage.widget.type: customapi
|
||||
homepage.widget.url: http://myserver:8000/json
|
||||
homepage.widget.url: http://myserver:8000/api/v3/json
|
||||
homepage.widget.mappings[0].label: Monitoring
|
||||
homepage.widget.mappings[0].field.metrics: monitored_images
|
||||
homepage.widget.mappings[0].format: number
|
||||
@@ -51,7 +51,7 @@ Credit: [@agrmohit](https://github.com/agrmohit)
|
||||
```yaml
|
||||
widget:
|
||||
type: customapi
|
||||
url: http://<SERVER_IP>:9000/json
|
||||
url: http://<SERVER_IP>:9000/api/v3/json
|
||||
refreshInterval: 10000
|
||||
method: GET
|
||||
mappings:
|
||||
|
||||
@@ -33,7 +33,7 @@ Cup has an option to be configured from a configuration file named `cup.json`.
|
||||
<Steps>
|
||||
### Create the configuration file
|
||||
Create a `cup.json` file somewhere on your system. For binary installs, a path like `~/.config/cup.json` is recommended.
|
||||
If you're running with Docker, you can create a `cup.json` in the directory you're running cup and mount it into the container. _In the next section you will need to use the path where you **mounted** the file_
|
||||
If you're running with Docker, you can create a `cup.json` in the directory you're running Cup and mount it into the container. _In the next section you will need to use the path where you **mounted** the file_
|
||||
|
||||
### Configure Cup from the configuration file
|
||||
|
||||
@@ -66,6 +66,11 @@ Here's a full example:
|
||||
}
|
||||
```
|
||||
|
||||
<Callout>
|
||||
If you want autocompletions and error checking for your editor, there is a JSON schema available.
|
||||
Use it by adding a `"$schema": "https://raw.githubusercontent.com/sergi0g/cup/main/cup.schema.json"` entry in your `cup.json` file.
|
||||
</Callout>
|
||||
|
||||
### Run Cup with the new configuration file
|
||||
|
||||
To let Cup know that you'd like it to use a custom configuration file, you can use the `-c` flag, followed by the _absolute_ path of the file.
|
||||
|
||||
@@ -6,9 +6,15 @@ Some registries (or specific images) may require you to be authenticated. For th
|
||||
|
||||
```json
|
||||
{
|
||||
"authentication": {
|
||||
"<YOUR_REGISTRY_DOMAIN_1>": "<YOUR_TOKEN_1>",
|
||||
"<YOUR_REGISTRY_DOMAIN_2>": "<YOUR_TOKEN_2>"
|
||||
"registries": {
|
||||
"<YOUR_REGISTRY_DOMAIN_1>": {
|
||||
"authentication": "<YOUR_TOKEN_1>"
|
||||
// Other options
|
||||
},
|
||||
"<YOUR_REGISTRY_DOMAIN_2>" {
|
||||
"authentication": "<YOUR_TOKEN_2>"
|
||||
// Other options
|
||||
},
|
||||
// ...
|
||||
}
|
||||
// Other options
|
||||
|
||||
@@ -2,21 +2,31 @@ import { Callout } from "nextra-theme-docs";
|
||||
|
||||
# Insecure registries
|
||||
|
||||
For the best security, Cup only connects to registries over SSL (HTTPS) by default. However, for people running a local registry that haven't configured SSL, this may be a problem.
|
||||
For the best security, Cup only connects to registries over SSL (HTTPS) by default. However, for people running a local registry that doesn't support SSL, this may be a problem.
|
||||
|
||||
To solve this problem, `cup.json` has an `"insecure_registries"` option which allows you to specify exceptions
|
||||
To solve this problem, you can specify exceptions in your `cup.json`.
|
||||
|
||||
Here's what it looks like:
|
||||
|
||||
```json
|
||||
{
|
||||
"insecure_registries": ["<INSECURE_REGISTRY_1>", "<INSECURE_REGISTRY_2>"]
|
||||
"registries": {
|
||||
"<INSECURE_REGISTRY_1>": {
|
||||
"insecure": true
|
||||
// Other options
|
||||
},
|
||||
"<INSECURE_REGISTRY_2>" {
|
||||
"insecure": true
|
||||
// Other options
|
||||
},
|
||||
// ...
|
||||
}
|
||||
// Other options
|
||||
}
|
||||
```
|
||||
|
||||
<Callout emoji="⚠️">
|
||||
When configuring an insecure registry that doesn't run on port 80, don't
|
||||
forget to specify it (i.e. use `localhost:5000` instead of `localhost` if your
|
||||
forget to specify the port (i.e. use `localhost:5000` instead of `localhost` if your
|
||||
registry is running on port `5000`)
|
||||
</Callout>
|
||||
|
||||
@@ -17,7 +17,7 @@ This was replaced by a more neutral theme which is now the default:
|
||||
<Image alt="Screenshot of neutral theme" src={neutral} />
|
||||
|
||||
However, you can get the old theme back by adding the `theme` key to your `cup.json`
|
||||
Available values are `default` and `blue`.
|
||||
Available options are `default` and `blue`.
|
||||
|
||||
Here's an example:
|
||||
|
||||
|
||||
@@ -11,66 +11,53 @@ Cup's CLI provides the `cup check` command.
|
||||
|
||||
```ansi
|
||||
$ cup check
|
||||
[32mnginx:alpine Update available
|
||||
redis:7 Update available
|
||||
[38;5;1m
|
||||
mysql:8.0 Major update
|
||||
node:20 Major update
|
||||
postgres:16-alpine Major update[0m[38;5;3m
|
||||
rust:1.80.1-alpine Minor update[0m[38;5;12m
|
||||
redis:7.4.0 Patch update
|
||||
nginx:alpine Update available
|
||||
redis:alpine Update available
|
||||
[0m...
|
||||
[34mcentos:7 Up to date
|
||||
mcr.microsoft.com/devcontainers/go:0-1.19-bullseye Up to date
|
||||
rockylinux:9-minimal Up to date
|
||||
rabbitmq:3.11.9-management Up to date
|
||||
[0m...
|
||||
[90msome/deleted:image Unknown
|
||||
[38:5:86mINFO ✨ Checked 58 images in 3772ms
|
||||
ubuntu:latest Update available[0m[38;5;2m
|
||||
node:iron Up to date
|
||||
2fauth/2fauth:latest Up to date
|
||||
c1982/sdns:latest Up to date[0m[38;5;8m
|
||||
registry.acme.com/acme-server:latest Unknown
|
||||
[36;1mINFO [0m✨ Checked 58 images in 3772ms
|
||||
```
|
||||
|
||||
### Check for updates to specific images
|
||||
|
||||
```ansi
|
||||
$ cup check node:latest
|
||||
[32mnode:latest Update available
|
||||
[38:5:86mINFO ✨ Checked 1 images in 1310ms
|
||||
$ cup check node:latest[38;5;12m
|
||||
node:latest Update available
|
||||
[36;1mINFO [0m✨ Checked 1 images in 1310ms
|
||||
```
|
||||
|
||||
```ansi
|
||||
$ cup check node:latest
|
||||
[32mnextcloud:30 Update available
|
||||
postgres:14 Update available
|
||||
[34mmysql:8.0 Up to date
|
||||
[38:5:86mINFO ✨ Checked 3 images in 1769ms
|
||||
$ cup check nextcloud:30 postgres:14 mysql:8.0[38;5;12m
|
||||
nextcloud:30 Update available
|
||||
postgres:14 Update available[38;5;2m
|
||||
mysql:8.0 Up to date
|
||||
[36;1mINFO [0m✨ Checked 3 images in 1769ms
|
||||
```
|
||||
|
||||
## Enable icons
|
||||
|
||||
You can also enable icons if you have a [Nerd Font](https://nerdfonts.com) installed.
|
||||
|
||||
<Image src={cup} unoptimized />
|
||||
<Image src={cup} alt="GIF of Cup's CLI" unoptimized />
|
||||
|
||||
## JSON output
|
||||
|
||||
When integrating Cup with other services (e.g. webhooks or a dashboard), you may find Cup's JSON output functionality useful.
|
||||
|
||||
It provides some useful metrics (see [server](/docs/usage/server) for more information), along with a list of images and whether they have an update or not.
|
||||
It provides some useful metrics (see [server](/docs/usage/server) for more information), along with a list of images and whether they have an update or not. Note that at the moment it does not match the detailed API the server provides.
|
||||
|
||||
```
|
||||
$ cup check -r
|
||||
{"metrics":{"update_available":4,"monitored_images":25,"unknown":1,"up_to_date":20},"images":{"ghcr.io/immich-app/immich-server:v1.106.4":false,"portainer/portainer-ce:2.20.3-alpine":false,"ghcr.io/runtipi/runtipi:v3.4.1":false,...}}
|
||||
```
|
||||
|
||||
Here is how it would look in Typescript:
|
||||
|
||||
```ts
|
||||
interface CupData {
|
||||
metrics: {
|
||||
monitored_images: number;
|
||||
up_to_date: number;
|
||||
update_available: number;
|
||||
unknown: number;
|
||||
};
|
||||
images: {
|
||||
[image: string]: boolean | null;
|
||||
};
|
||||
}
|
||||
{"metrics":{"monitored_images":26,"up_to_date":2,"updates_available":23,"major_updates":8,"minor_updates":6,"patch_updates":2,"other_updates":7,"unknown":1},"images":{"ghcr.io/immich-app/immich-server:v1.106.4":false,"portainer/portainer-ce:2.20.3-alpine":false,"ghcr.io/runtipi/runtipi:v3.4.1":false,...}}
|
||||
```
|
||||
|
||||
## Usage with Docker
|
||||
@@ -79,12 +66,12 @@ If you're using the Docker image, just replace all occurences of `cup` in the ex
|
||||
|
||||
For example, this:
|
||||
|
||||
```bash /check node:latest/
|
||||
```bash
|
||||
$ cup check node:latest
|
||||
```
|
||||
|
||||
becomes:
|
||||
|
||||
```bash /check node:latest/
|
||||
```bash
|
||||
$ docker run -tv /var/run/docker.sock:/var/run/docker.sock ghcr.io/sergi0g/cup check node:latest
|
||||
```
|
||||
|
||||
@@ -10,6 +10,10 @@ export default {
|
||||
return {
|
||||
titleTemplate: "Cup – %s",
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
titleTemplate: "%s"
|
||||
}
|
||||
}
|
||||
},
|
||||
head: () => {
|
||||
|
||||
Reference in New Issue
Block a user