chore: update readme with deployment instructions

This commit is contained in:
neri 2025-02-04 19:52:57 +01:00
parent ecaa321547
commit d2ba86dfd2

View file

@ -57,15 +57,32 @@ Require authentication for certain uploads
| NO_AUTH_LARGE_FILE_MAX_TIME | |
| NO_AUTH_LARGE_FILE_SIZE | |
## compiling
## Deploying using Docker
```sh
# Clone the repository
git clone https://git.ctdo.de/neri/datatrash
cd datatrash
# Copy and update the docker-compose.yml
cp docker-compose.yml.sample docker-compose.yml
$EDITOR docker-compose.yml
# Start the container
docker-compose up -d
```
## Compiling the binary
When you have a [rust toolchain](https://rustup.rs/) installed:
```sh
cargo build --release
```
or
or when you have docker installed:
```sh
docker build -t datatrash .
docker cp datatrash:/home/rust/.cargo/bin/datatrash datatrash
id=$(docker create datatrash)
docker cp $id:/opt/datatrash/datatrash datatrash
docker rm -v $id
```