Skip to content

Commit

Permalink
chore: Update toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
m1sk9 committed Jan 23, 2025
1 parent 31cefb1 commit a190d21
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
FEATURE_FLAG=json_logging
# Discord API token
DISCORD_API_TOKEN=
# Configuration file path (relative path)
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.13.19"
edition = "2021"
license = "MIT"
repository = "https://github.com/m1sk9/babyrite"
description = "A citation message Discord bot."

[dependencies]
anyhow = { version = "1.0.82" }
Expand Down
41 changes: 36 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,46 @@ docker pull ghcr.io/m1sk9/babyrite:v0.14.0

## Features

- **Lightweight**: babyrite uses [distroless](https://github.com/GoogleContainerTools/distroless) as its base image and consists of a very lightweight Docker Image.
- **Lightweight**: babyrite uses [distroless](https://github.com/GoogleContainerTools/distroless) as its base image and
consists of a very lightweight Docker Image.
- **Fast**: babyrite is developed in Rust and is very fast!
- **OSS**: babyrite is open-source and licensed under the MIT License. It also provides a way to host it yourself as well as publish it as OSS.
- **OSS**: babyrite is open-source and licensed under the MIT License. It also provides a way to host it yourself as
well as publish it as OSS.
- **Easy to Use**: babyrite is very easy to use and can be deployed in seconds.

## Usage
## Installation

- Send a message link in a channel where babyrite can view it, and it will send a preview of the message's content
- babyrite can also show attached images and GIF files as preview. These are sent through Discord's CDN and are never stored on the server side.
It is recommended to use Docker Compose when setting up babyrite. Direct startup using Docker images or binary files is also possible but not recommended.
```yaml
services:
app:
image: ghcr.io/m1sk9/babyrite:v0.14.0
env_file:
- .env
restart: always
```
If you are using orchestration tools such as k8s or Docker Swarm, please configure them according to their respective configuration files.
## Configuration and Environment Variables
You can customize the behavior of babyrite by using a dedicated configuration file. The settings are written in TOML format. Refer to [`config/config.toml`](./config/config.toml) for configuration items.

You can also start with the default settings without configuring. The following are the default settings used in that case.

```toml
feature_flag = ""
is_mention = true
is_deletable = true
is_allow_nsfw = false
```

The environment variables used by babyrite are as follows. Note that the only environment variable required for startup is DISCORD_API_TOKEN.

| Key | Description |
|---------------------|-------------------------------------------------|
| `DISCORD_API_TOKEN` | Discord API token |
| `CONFIG_FILE` | Path to the configuration file (recursive path) |

## LICENSE

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "stable"
components = ["clippy", "rustfmt"]
components = ["clippy", "rustfmt", "cargo"]

0 comments on commit a190d21

Please sign in to comment.