mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-08 05:03:49 -05:00
Compare commits
3 Commits
6d88036914
...
6dc1030a3b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dc1030a3b | ||
|
|
d2c1651761 | ||
|
|
8b3cf73f65 |
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cup"
|
||||
version = "3.3.0"
|
||||
version = "3.4.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { Callout } from "nextra/components";
|
||||
|
||||
# Automatic refresh
|
||||
|
||||
Cup can automatically refresh the results when running in server mode. Simply add this to your config:
|
||||
@@ -9,4 +11,8 @@ Cup can automatically refresh the results when running in server mode. Simply ad
|
||||
}
|
||||
```
|
||||
|
||||
You can use a cron expression to specify the refresh interval. Note that seconds are not optional. The reference is [here](https://github.com/Hexagon/croner-rust#pattern)
|
||||
You can use a cron expression to specify the refresh interval. Note that seconds are not optional. The reference is [here](https://github.com/Hexagon/croner-rust#pattern).
|
||||
|
||||
<Callout>
|
||||
If you use a schedule with absolute time (e.g. every day at 6 AM), make sure to set the `TZ` environment variable to your [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).
|
||||
</Callout>
|
||||
|
||||
@@ -109,3 +109,36 @@ $ docker run -tv /var/run/docker.sock:/var/run/docker.sock -v /home/sergio/.conf
|
||||
```
|
||||
|
||||
</Steps>
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Want to make a quick change without editing your `config.json`? Cup also supports some configuration options from environment variables.
|
||||
Here are the ones currently available:
|
||||
- `CUP_AGENT` - Agent mode
|
||||
- `CUP_IGNORE_UPDATE_TYPE` - Ignoring specific update types
|
||||
- `CUP_REFRESH_INTERVAL` - Automatic refresh
|
||||
- `CUP_SOCKET` - Socket
|
||||
- `CUP_THEME` - Theme
|
||||
|
||||
Refer to the configuration page for more information on each of these.
|
||||
|
||||
Here's an example of a Docker Compose file using them:
|
||||
```yaml
|
||||
services:
|
||||
cup:
|
||||
image: ghcr.io/sergi0g/cup:latest
|
||||
command: serve
|
||||
ports:
|
||||
- 8000:8000
|
||||
environment:
|
||||
- CUP_AGENT: true
|
||||
- CUP_IGNORE_UPDATE_TYPE: major
|
||||
- CUP_REFRESH_INTERVAL: "0 */30 * * * *"
|
||||
- CUP_SOCKET: tcp://localhost:2375
|
||||
- CUP_THEME: blue
|
||||
```
|
||||
|
||||
<Callout>
|
||||
Heads up!
|
||||
Any configuration option you set with environment variables **always** overrides anything in your `cup.json`.
|
||||
</Callout>
|
||||
Reference in New Issue
Block a user