audon/README.md

130 wiersze
3.3 KiB
Markdown

2023-01-12 23:45:35 +00:00
<div align="center">
2023-01-12 23:52:18 +00:00
<img src="audon-fe/src/assets/img/audon-wordmark-white-text-isolated.svg" alt="Branding Logo" align="center" title="Branding logo designed by GENKI" />
2023-01-12 23:45:35 +00:00
</div>
----
2022-12-17 02:30:57 +00:00
2024-02-16 02:51:45 +00:00
This repository is archived and will no longer be updated. Successor: [Hamabē](https://codeberg.org/hamabe/hamabe)
----
2023-01-12 23:50:44 +00:00
<div align="right">
2023-01-12 23:52:18 +00:00
<img src="audon-fe/src/assets/img/mascot.webp" alt="Mascot" width="150" align="right" title="Mascot designed by Taiyo Fujii" />
2023-01-12 23:50:44 +00:00
</div>
2022-12-17 02:30:57 +00:00
Audio + Mastodon = Audon
2023-05-28 12:59:27 +00:00
Audon is a service of realtime audio chat for Mastodon, Akkoma, GoToSocial, and Calckey.
Other Fediverse platforms supporting Mastodon API may work, but not tested (yet).
2022-12-17 02:30:57 +00:00
## Tech Stack
- **[Go](https://go.dev/)** powers the backend server
- **[Vue.js](https://vuejs.org/), [Vite](https://viejs.dev/) and [Vuetify](https://next.vuetifyjs.com/)** are used for the browser frontend
- **[LiveKit](https://livekit.io/)** as WebRTC SFU and TURN server
- **[MongoDB](https://mongodb.com/) and [Redis](https://redis.io/)** for storing data
## Deployment
Only Docker-based installation is currently supported. This repository provides pre-configured `Dockerfile` and `docker-compose.yaml`.
Note that the LiveKit service runs in the Host-network mode, thus the following ports have to be available in the host machine.
- 7880/tcp
- 7881/tcp
- 50000-60000/udp
- 5349/tcp
- 3478/udp
These ports are changeable in `config/livekit.yaml`. Please refer to the documentation of LiveKit [here](https://docs.livekit.io/oss/deployment/).
### Requirements
- **Docker** 20.10+
2022-12-17 04:26:55 +00:00
- **docker-compose** 2.12+
2022-12-17 02:30:57 +00:00
## Installation Steps
2022-12-18 00:12:30 +00:00
Before getting started, clone this repo in your working directory.
```
git clone --recursive https://codeberg.org/nmkj/audon.git
```
2022-12-17 02:30:57 +00:00
### Edit Config Files
2022-12-17 04:41:08 +00:00
The followings config files are needed to run Audon.
2022-12-17 02:30:57 +00:00
2023-01-11 12:22:59 +00:00
- `.env.production`
2022-12-17 02:30:57 +00:00
- `config/livekit.yaml`
2022-12-17 04:41:08 +00:00
- `config/redis.conf`
2022-12-17 02:30:57 +00:00
2022-12-17 02:56:25 +00:00
First, create them by copying the sample files.
2022-12-17 02:30:57 +00:00
```
2022-12-17 04:41:08 +00:00
cp .env.production.sample .env.production && cp config/livekit.sample.yaml config/livekit.yaml && cp config/redis.sample.conf config/redis.conf
2022-12-17 02:30:57 +00:00
```
Then, create a pair of API key and secret to connect to LiveKit.
```
docker run --rm -it livekit/generate
```
You will be asked some questions, but they do not matter. Just enter random domains and keep hitting Return/Enter key.
Then generated API key and secret appear as follows:
```
API Key: your-key
API Secret: your-secret
```
Copy and paste these values to `.env.production` and `config/livekit.yaml`, for example,
```yaml
keys:
your-key:your-secret
```
```conf
# Same as the keys field in livekit.yaml
LIVEKIT_API_KEY=your-key
# Same as the keys field in livekit.yaml
LIVEKIT_API_SECRET=your-secret
```
### Prepare Reverse Proxy
The easiest way is to use [Caddy](https://caddyserver.com/) as TLS endpoints. Here is an example Caddyfile:
```
audon.example.com {
2022-12-17 02:38:45 +00:00
encode gzip
reverse_proxy 127.0.0.1:8100
2022-12-17 02:30:57 +00:00
}
livekit.example.com {
2022-12-17 02:38:45 +00:00
reverse_proxy 127.0.0.1:7880
2022-12-17 02:30:57 +00:00
}
h2://livekit-turn.example.com {
2022-12-17 02:38:45 +00:00
reverse_proxy 127.0.0.1:5349
2022-12-17 02:30:57 +00:00
}
h3://livekit-turn.example.com {
2022-12-17 02:38:45 +00:00
reverse_proxy h3://127.0.0.1:3478
}
2022-12-17 02:30:57 +00:00
```
You may want to use your own TLS certificates with `tls` directive of Caddyfile.
### Build and Start Containers
With your config files ready, run the following command to start containers.
```
docker compose build && docker compose up -d
```