mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-13 07:33:48 -05:00
Make final documentation changes
This commit is contained in:
15
.github/workflows/docs.yml
vendored
15
.github/workflows/docs.yml
vendored
@@ -24,7 +24,20 @@ jobs:
|
|||||||
run: pnpm install
|
run: pnpm install
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
- name: Publish
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: docs/out/
|
path: docs/out/
|
||||||
|
deploy:
|
||||||
|
needs: build
|
||||||
|
permissions:
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
121
README.md
121
README.md
@@ -18,126 +18,9 @@ Cup is the easiest way to check for container image updates.
|
|||||||
- The binary is tiny! At the time of writing it's just 4.7 MB. No more pulling 100+ MB docker images for a such a simple program.
|
- The binary is tiny! At the time of writing it's just 4.7 MB. No more pulling 100+ MB docker images for a such a simple program.
|
||||||
- JSON output for both the CLI and web interface so you can connect Cup to integrations. It's easy to parse and makes webhooks and pretty dashboards simple to set up!
|
- JSON output for both the CLI and web interface so you can connect Cup to integrations. It's easy to parse and makes webhooks and pretty dashboards simple to set up!
|
||||||
|
|
||||||
## Installation
|
## Documentation
|
||||||
|
|
||||||
You can install Cup in 2 ways: as a docker container (recommended) or as a binary.
|
Take a look at https://sergi0g.github.io/cup/docs/introduction!
|
||||||
|
|
||||||
### With docker
|
|
||||||
|
|
||||||
Requirements: [Docker](https://docs.docker.com/engine/install/)
|
|
||||||
|
|
||||||
Difficulty: Easy
|
|
||||||
|
|
||||||
- Open a terminal and run `docker pull ghcr.io/sergi0g/cup`. If you're not in the `docker` group, make sure to prefix the command as root.
|
|
||||||
|
|
||||||
That's it! Now head over to the Usage section!
|
|
||||||
|
|
||||||
### From source
|
|
||||||
|
|
||||||
Requirements: [Rust](https://rustup.rs)
|
|
||||||
|
|
||||||
Difficulty: Moderate
|
|
||||||
|
|
||||||
1. Open a terminal and clone the git repository
|
|
||||||
```
|
|
||||||
$ git clone https://github.com/sergi0g/cup
|
|
||||||
```
|
|
||||||
2. Change your directory to the repository you just cloned
|
|
||||||
```
|
|
||||||
$ cd cup
|
|
||||||
```
|
|
||||||
3. Build Cup
|
|
||||||
```
|
|
||||||
$ cargo build --release
|
|
||||||
```
|
|
||||||
This will build cup with all features by default. If you want to build just the server, you can append `--no-default-features --features cli` or `--no-default-features --features server` depending one what you need.
|
|
||||||
4. Add the binary to your path for easy access
|
|
||||||
|
|
||||||
Consult your shell's documentation on how to do this. For Bash, the following will likely work:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ mv /target/release/cup ~/.local/bin
|
|
||||||
```
|
|
||||||
|
|
||||||
Make sure to reload your shell.
|
|
||||||
|
|
||||||
You're now ready to use Cup!
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
### CLI
|
|
||||||
|
|
||||||
Cup's CLI provides the `cup check` command.
|
|
||||||
|
|
||||||
Basic usage:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cup check
|
|
||||||
nginx:alpine Update available
|
|
||||||
redis:7 Update available
|
|
||||||
redis:alpine Update available
|
|
||||||
...
|
|
||||||
centos: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
|
|
||||||
...
|
|
||||||
some/deleted:image Unknown
|
|
||||||
```
|
|
||||||
|
|
||||||
If you have a [Nerd Font](https://nerdfonts.com) installed, you can also add icons with the `-i` flag: `cup check -i`
|
|
||||||
|
|
||||||
If you want the output to be JSON, use the `-r` flag:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cup check -r
|
|
||||||
[{"image":"nginx:alpine","has_update":true},{"image":"rockylinux:9-minimal","has_update":false},{"image":"some/deleted:image","has_update":null}]
|
|
||||||
```
|
|
||||||
|
|
||||||
Checking a single image is also possible:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cup check node:latest
|
|
||||||
node:latest has an update available
|
|
||||||
```
|
|
||||||
|
|
||||||
If using the docker image:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ docker run -v /var/run/docker.sock:/var/run/docker.sock cup check
|
|
||||||
```
|
|
||||||
|
|
||||||
### Server
|
|
||||||
|
|
||||||
The server provides the `cup serve` command.
|
|
||||||
|
|
||||||
Basic usage:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cup serve
|
|
||||||
Serving on http://0.0.0.0:8000
|
|
||||||
Received GET request on /
|
|
||||||
Received GET request on /json
|
|
||||||
```
|
|
||||||
|
|
||||||
This will launch the server on port 8000. To access it, visit `http://<YOUR_IP>:8000` (replace `<YOUR_IP>` with the IP address of the machine running Cup.)
|
|
||||||
|
|
||||||
The URL `http://<YOUR_IP>:8000/json` is also available for usage with integrations.
|
|
||||||
|
|
||||||
If you want to use a custom port, use the `-p` flag:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cup check -p 9000
|
|
||||||
Serving on http://0.0.0.0:9000
|
|
||||||
Received GET request on /
|
|
||||||
Received GET request on /json
|
|
||||||
```
|
|
||||||
|
|
||||||
If using the docker image (replace `<PORT>` with the port you're using (default 8000)):
|
|
||||||
|
|
||||||
```
|
|
||||||
$ docker run -v /var/run/docker.sock:/var/run/docker.sock -p <PORT>:<PORT> cup serve
|
|
||||||
```
|
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
|
|||||||
1
docs/README.md
Normal file
1
docs/README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This is where Cup's documentation lives. It's created with [Nextra](https://nextra.site).
|
||||||
@@ -9,9 +9,5 @@
|
|||||||
"theme": {
|
"theme": {
|
||||||
"typesetting": "article"
|
"typesetting": "article"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"index": {
|
|
||||||
"title": "Home",
|
|
||||||
"display": "hidden"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Welcome to Cup
|
|
||||||
|
|
||||||
Hello world!
|
|
||||||
Reference in New Issue
Block a user