From d20449517e87eb3b37fbee2db3a780fde4823227 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 14 Jun 2025 11:48:16 +1200 Subject: [PATCH] 'Generic Commit' --- README.md | 30 ++++++++++++++---------------- src/main.cpp | 4 +++- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 77d48f1..aa0f346 100644 --- a/README.md +++ b/README.md @@ -16,21 +16,19 @@ A simple object storage system that stores files with metadata and provides a RE ## Building +To build output/simple-object-server, and the docker image gitea.jde.nz/public/simple-object-server:test, run: ```bash -mkdir build -cd build -cmake .. -make +./build.sh ``` -## Docker - -You can also run the service using Docker. Here's how: - -### Building the Docker Image - +To test the docker image gitea.jde.nz/public/simple-object-server:test, run: ```bash -docker build -t simple-object-storage . +./test.sh +``` + +To build for multiple architectures, and publish the combined docker image to gitea.jde.nz, run: +```bash +./publish.sh ``` ### Running with Docker @@ -40,8 +38,8 @@ docker run -d \ -p 8080:8080 \ -v /path/to/storage:/data/storage \ -v /path/to/sos_config.json:/data/sos_config.json:ro \ - --name object-storage \ - simple-object-storage + --name object-server \ + gitea.jde.nz/public/simple-object-server ``` This will: @@ -59,8 +57,8 @@ Alternatively, you can use Docker Compose. Create a `docker-compose.yml` file: ```yaml version: '3' services: - object-storage: - build: . + object-server: + image: gitea.jde.nz/public/simple-object-server ports: - "8080:8080" volumes: @@ -76,7 +74,7 @@ docker-compose up -d ## Configuration -The server can be configured by creating a JSON configuration file at `~/.config/simple_object_storage/sos_config.json`. Default values are shown below (everything but write tokens), suitable for running in Docker. +The server can be configured by creating a JSON configuration file at `~/.config/simple-object-server/sos_config.json`. Default values are shown below (everything but write tokens), suitable for running in Docker. ```json { diff --git a/src/main.cpp b/src/main.cpp index e08fe2a..7090743 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,8 +27,10 @@ std::filesystem::path get_config_path() { // check for config in the following paths: std::vector config_paths = { "/data/sos_config.json", + _home / ".config/simple-object-server/sos_config.json", + _home / ".config/simple-object-server/config.json", _home / ".config/simple_object_storage/sos_config.json", - "sos_config.json", + _exe / "sos_config.json", "/testing/sos_config.json" };