From fa2629bb4f7a12fca1225454d866b0dcf62e373a Mon Sep 17 00:00:00 2001 From: Sergio <77530549+sergi0g@users.noreply.github.com> Date: Fri, 28 Feb 2025 19:37:48 +0200 Subject: [PATCH] Update docs --- docs/src/content/docs/configuration/index.mdx | 21 +++++-- docs/src/content/docs/usage/cli.mdx | 61 ++++++++++++------- docs/src/content/docs/usage/server.mdx | 28 ++++----- 3 files changed, 68 insertions(+), 42 deletions(-) diff --git a/docs/src/content/docs/configuration/index.mdx b/docs/src/content/docs/configuration/index.mdx index 88a207b..acbfc1f 100644 --- a/docs/src/content/docs/configuration/index.mdx +++ b/docs/src/content/docs/configuration/index.mdx @@ -8,7 +8,7 @@ import { IconLockOpen, IconKey, IconPlug, - IconServer + IconServer, } from "@tabler/icons-react"; # Configuration @@ -71,12 +71,21 @@ Here's a full example: ```json { - "authentication": { - "ghcr.io": "", - "registry-1.docker.io": "" + "$schema": "https://raw.githubusercontent.com/sergi0g/cup/v3/cup.schema.json", + "version": 3, + "images": { + "exclude": ["ghcr.io/immich-app/immich-machine-learning"], + "extra": ["ghcr.io/sergi0g/cup:v3.0.0"] }, - "theme": "blue", - "insecure_registries": ["localhost:5000", "my-insecure-registry.example.com"] + "registries": { + "myregistry.com": { + "authentication": "" + } + }, + "servers": { + "Raspberry Pi": "https://server.local:8000" + }, + "theme": "blue" } ``` diff --git a/docs/src/content/docs/usage/cli.mdx b/docs/src/content/docs/usage/cli.mdx index 1b233d8..5d6824c 100644 --- a/docs/src/content/docs/usage/cli.mdx +++ b/docs/src/content/docs/usage/cli.mdx @@ -12,36 +12,52 @@ Cup's CLI provides the `cup check` command. ```ansi $ cup check - -mysql:8.0 Major update -node:20 Major update -postgres:16-alpine Major update -rust:1.80.1-alpine Minor update -redis:7.4.0 Patch update -nginx:alpine Update available -redis:alpine Update available -ubuntu:latest Update available -node:iron Up to date -2fauth/2fauth:latest Up to date -c1982/sdns:latest Up to date -registry.acme.com/acme-server:latest Unknown -INFO ✨ Checked 58 images in 3772ms +✓ Done! +~ Local images + ╭─────────────────────────────────────────┬──────────────────────────────────┬─────────╮ + │Reference │Status │Time (ms)│ + ├─────────────────────────────────────────┼──────────────────────────────────┼─────────┤ + │postgres:15-alpine │Major update (15 → 17) │788 │ + │ghcr.io/immich-app/immich-server:v1.118.2│Minor update (1.118.2 → 1.127.0) │2294 │ + │ollama/ollama:0.4.1 │Minor update (0.4.1 → 0.5.12) │533 │ + │adguard/adguardhome:v0.107.52 │Patch update (0.107.52 → 0.107.57)│1738 │ + │jc21/nginx-proxy-manager:latest │Up to date │583 │ + │louislam/uptime-kuma:1 │Up to date │793 │ + │moby/buildkit:buildx-stable-1 │Up to date │600 │ + │tecnativa/docker-socket-proxy:latest │Up to date │564 │ + │ubuntu:latest │Up to date │585 │ + │wagoodman/dive:latest │Up to date │585 │ + │rolebot:latest │Unknown │174 │ + ╰─────────────────────────────────────────┴──────────────────────────────────┴─────────╯ + INFO ✨ Checked 11 images in 8312ms ``` ### Check for updates to specific images ```ansi -$ cup check node:latest -node:latest Update available -INFO ✨ Checked 1 images in 1310ms +$ cup check node:latest +✓ Done! +~ Local images + ╭───────────┬────────────────┬─────────╮ + │Reference │Status │Time (ms)│ + ├───────────┼────────────────┼─────────┤ + │node:latest│Update available│788 │ + ╰───────────┴────────────────┴─────────╯ + INFO ✨ Checked 1 images in 310ms ``` ```ansi $ cup check nextcloud:30 postgres:14 mysql:8.0 -nextcloud:30 Update available -postgres:14 Update available -mysql:8.0 Up to date -INFO ✨ Checked 3 images in 1769ms +✓ Done! +~ Local images + ╭────────────┬────────────────────────┬─────────╮ + │Reference │Status │Time (ms)│ + ├────────────┼────────────────────────┼─────────┤ + │postgres:14 │Major update (14 → 17) │195 │ + │mysql:8.0 │Major update (8.0 → 9.2)│382 │ + │nextcloud:30│Up to date │585 │ + ╰────────────┴────────────────────────┴─────────╯ + INFO ✨ Checked 3 images in 769ms ``` ## Enable icons @@ -62,7 +78,8 @@ $ cup check -r ``` -When parsing Cup's output, capture only `stdout`, otherwise you might not get valid JSON (if there are warnings) + When parsing Cup's output, capture only `stdout`, otherwise you might not get + valid JSON (if there are warnings) ## Usage with Docker diff --git a/docs/src/content/docs/usage/server.mdx b/docs/src/content/docs/usage/server.mdx index e3fa07f..14683bf 100644 --- a/docs/src/content/docs/usage/server.mdx +++ b/docs/src/content/docs/usage/server.mdx @@ -8,13 +8,13 @@ The server provides the `cup serve` command. ```ansi $ cup serve -INFO Starting server, please wait... -INFO ✨ Checked 8 images in 8862ms -INFO Ready to start! -HTTP GET / 200 in 0ms -HTTP GET /assets/index.js 200 in 3ms -HTTP GET /assets/index.css 200 in 0ms -HTTP GET /api/v3/json 200 in 0ms + INFO Starting server, please wait... + INFO ✨ Checked 8 images in 8862ms + INFO Ready to start! + HTTP GET / 200 in 0ms + HTTP GET /assets/index.js 200 in 3ms + HTTP GET /assets/index.css 200 in 0ms + HTTP GET /api/v3/json 200 in 0ms ``` This will launch the server on port `8000`. To access it, visit `http://:8000` (replace `` with the IP address of the machine running Cup.) @@ -29,13 +29,13 @@ Pass the `-p` argument with the port you want to use ```ansi $ cup serve -p 9000 -INFO Starting server, please wait... -INFO ✨ Checked 8 images in 8862ms -INFO Ready to start! -HTTP GET / 200 in 0ms -HTTP GET /assets/index.js 200 in 3ms -HTTP GET /assets/index.css 200 in 0ms -HTTP GET /api/v3/json 200 in 0ms + INFO Starting server, please wait... + INFO ✨ Checked 8 images in 8862ms + INFO Ready to start! + HTTP GET / 200 in 0ms + HTTP GET /assets/index.js 200 in 3ms + HTTP GET /assets/index.css 200 in 0ms + HTTP GET /api/v3/json 200 in 0ms ``` ## Usage with Docker