Add running examples
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
kieran 2024-05-14 11:27:54 +01:00
parent d4e36110d1
commit fc9263dc81
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
4 changed files with 58 additions and 3 deletions

View File

@ -37,6 +37,5 @@ RUN apt update && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /app/build .
COPY --from=build /app/src/ui ui
COPY --from=build /app/src/config.toml .
COPY --from=build /app/ffmpeg/lib/ /lib
ENTRYPOINT ["/app/bin/void_cat"]
ENTRYPOINT ["./bin/void_cat"]

View File

@ -9,4 +9,22 @@ Image hosting service
- Blurhash calculation (NIP-96)
## Planned
- Torrent seed V2
- Torrent seed V2
## Running
### Docker Compose
The easiest way to run `void-cat-rs` is to use `docker compose`
```bash
docker compose -f docker-compose.prod.yml up
```
### Manual
Assuming you already created your `config.toml` and configured the `database` run:
```bash
docker run --rm -it \
-p 8000:8000 \
-v ./config.toml:/app/config.toml \
-e "RUST_LOG=info" \
voidic/void-cat-rs
```

17
config.prod.toml Normal file
View File

@ -0,0 +1,17 @@
# Listen address for webserver
listen = "0.0.0.0:8000"
# Database connection string (MYSQL)
database = "mysql://root:root@db:3306/void_cat"
# Directory to store uploads
storage_dir = "/app/data"
# Maximum support filesize for uploading
max_upload_bytes = 104857600
# Public facing url
public_url = "http://localhost:8000"
# Whitelisted pubkeys, leave out to disable
# whitelist = ["63fe6318dc58583cfe16810f86dd09e18bfd76aabc24a0081ce2856f330504ed"]

21
docker-compose.prod.yml Normal file
View File

@ -0,0 +1,21 @@
volumes:
db:
files:
services:
db:
image: mariadb
environment:
- "MARIADB_ROOT_PASSWORD=root"
- "MARIADB_DATABASE=void_cat"
volumes:
- "db:/var/lib/mysql"
app:
image: voidic/void-cat-rs
#build: .
environment:
- "RUST_LOG=info"
ports:
- "8000:8000"
volumes:
- "files:/app/data"
- "./config.prod.toml:/app/config.toml"