Content-addressable storage serving of blobs. https://radio.animebits.moe/player/hash/b9dbb31bda75
Go to file
DataHoarder 1492209adf
continuous-integration/drone/push Build is passing Details
Fix referer, updated dependencies
2022-08-18 09:03:11 +02:00
scripts Updated dependencies, replace command with entrypoint, support setting SRG tasklimit directly. 2022-05-31 09:40:19 +02:00
.drone.yml Add gcc to test 2022-08-04 18:07:08 +02:00
.env.example Add gcc to test 2022-08-04 18:07:08 +02:00
.gitignore Added docker-compose override to gitignore 2022-06-05 00:12:07 +02:00
Dockerfile Update dependencies, bump Dockerfile to go 1.19 2022-08-04 15:39:10 +02:00
LICENSE Update LICENSE year 2022-01-16 13:37:30 +01:00
OrbitalBeat.go Fix referer, updated dependencies 2022-08-18 09:03:11 +02:00
README.md Go 1.18 update, added README instructions, extend mime types 2022-02-08 19:31:41 +01:00
docker-compose.yml Added EXTRA_CMDLINE= to .env 2022-06-06 23:50:48 +02:00
go.mod Fix referer, updated dependencies 2022-08-18 09:03:11 +02:00
go.sum Fix referer, updated dependencies 2022-08-18 09:03:11 +02:00
schema.sql Binary path 2022-01-16 11:07:35 +01:00

README.md

OrbitalBeat

Content-addressable storage serving of blobs.

Dependencies

Go >= 1.18

Postgres >= 14

Usage via docker-compose

Initial setup


# Copy example environment file
cp -v .env.example .env

# Edit .env (use whatever editor you prefer)
# TRUSTED_KEYS are public keys from FinalCommander instances
# At least add a valid DATA_MOUNT_PATH and TRUSTED_KEYS, adjust LISTEN_PORT as desired.
# Self-signed certificates will be generated if certificate entries are left empty.
nano .env

# Create/start postgres database
docker-compose up -d db

# Insert schema
docker-compose exec -T --env PGPASSWORD=orbeat db psql --host db --username orbeat orbeat < schema.sql

# Start everything else
docker-compose up -d

Adding files to database

# Add files to OrbitalBeat
# This will scan all files under DATA_MOUNT_PATH
./scripts/add.sh

# Add specific folder to OrbitalBeat
./scripts/add.sh /mnt/storage/folder/to/add

OrbitalBeat assumes that as long as a file exists in the database, it is immutable (contents did NOT change, besides deletion).

Only existence of file and size are checked. It is safe to delete files from backing storage.

Multiple hash duplicates can exist, and OrbitalBeat will check and return the first working one.

Digest values are sent on each HTTP response, which a supporting client can use to verify the response.

Update

docker-compose up -d --build

Certbot notes

  • Use pip certbot
  • Edit .env to add paths to certificates
$ certbot certonly \
--standalone \
--key-type=ecdsa --elliptic-curve=secp256r1 \
--domain <domain> \
--post-hook "docker restart orbitalbeat_orbeat_1"