'Generic Commit'
All checks were successful
Build-Test-Publish / build (push) Successful in 1m44s

This commit is contained in:
Your Name
2025-06-14 11:48:16 +12:00
parent 9fb018f162
commit d20449517e
2 changed files with 17 additions and 17 deletions

View File

@@ -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
{

View File

@@ -27,8 +27,10 @@ std::filesystem::path get_config_path() {
// check for config in the following paths:
std::vector<std::filesystem::path> 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"
};