Add running examples
This commit is contained in:
parent
d4e36110d1
commit
fc9263dc81
@ -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"]
|
18
README.md
18
README.md
@ -10,3 +10,21 @@ Image hosting service
|
||||
|
||||
## Planned
|
||||
- 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
17
config.prod.toml
Normal 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
21
docker-compose.prod.yml
Normal 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"
|
Loading…
x
Reference in New Issue
Block a user