This commit is contained in:
30
README.md
30
README.md
@@ -16,21 +16,19 @@ A simple object storage system that stores files with metadata and provides a RE
|
|||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
|
To build output/simple-object-server, and the docker image gitea.jde.nz/public/simple-object-server:test, run:
|
||||||
```bash
|
```bash
|
||||||
mkdir build
|
./build.sh
|
||||||
cd build
|
|
||||||
cmake ..
|
|
||||||
make
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Docker
|
To test the docker image gitea.jde.nz/public/simple-object-server:test, run:
|
||||||
|
|
||||||
You can also run the service using Docker. Here's how:
|
|
||||||
|
|
||||||
### Building the Docker Image
|
|
||||||
|
|
||||||
```bash
|
```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
|
### Running with Docker
|
||||||
@@ -40,8 +38,8 @@ docker run -d \
|
|||||||
-p 8080:8080 \
|
-p 8080:8080 \
|
||||||
-v /path/to/storage:/data/storage \
|
-v /path/to/storage:/data/storage \
|
||||||
-v /path/to/sos_config.json:/data/sos_config.json:ro \
|
-v /path/to/sos_config.json:/data/sos_config.json:ro \
|
||||||
--name object-storage \
|
--name object-server \
|
||||||
simple-object-storage
|
gitea.jde.nz/public/simple-object-server
|
||||||
```
|
```
|
||||||
|
|
||||||
This will:
|
This will:
|
||||||
@@ -59,8 +57,8 @@ Alternatively, you can use Docker Compose. Create a `docker-compose.yml` file:
|
|||||||
```yaml
|
```yaml
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
object-storage:
|
object-server:
|
||||||
build: .
|
image: gitea.jde.nz/public/simple-object-server
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -76,7 +74,7 @@ docker-compose up -d
|
|||||||
|
|
||||||
## Configuration
|
## 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
|
```json
|
||||||
{
|
{
|
||||||
|
@@ -27,8 +27,10 @@ std::filesystem::path get_config_path() {
|
|||||||
// check for config in the following paths:
|
// check for config in the following paths:
|
||||||
std::vector<std::filesystem::path> config_paths = {
|
std::vector<std::filesystem::path> config_paths = {
|
||||||
"/data/sos_config.json",
|
"/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",
|
_home / ".config/simple_object_storage/sos_config.json",
|
||||||
"sos_config.json",
|
_exe / "sos_config.json",
|
||||||
"/testing/sos_config.json"
|
"/testing/sos_config.json"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user