From d2ba86dfd2497d7c437d42456e18c06a482f402d Mon Sep 17 00:00:00 2001 From: neri Date: Tue, 4 Feb 2025 19:52:57 +0100 Subject: [PATCH] chore: update readme with deployment instructions --- README.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f709403..0da118a 100644 --- a/README.md +++ b/README.md @@ -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 ```