Content-addressable storage serving of blobs. https://radio.animebits.moe/player/hash/b9dbb31bda75
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
DataHoarder 1492209adf
continuous-integration/drone/push Build is passing Details
Fix referer, updated dependencies
10 months ago
scripts Updated dependencies, replace command with entrypoint, support setting SRG tasklimit directly. 1 year ago
.drone.yml Add gcc to test 10 months ago
.env.example Add gcc to test 10 months ago
.gitignore Added docker-compose override to gitignore 1 year ago
Dockerfile Update dependencies, bump Dockerfile to go 1.19 10 months ago
LICENSE Update LICENSE year 1 year ago
OrbitalBeat.go Fix referer, updated dependencies 10 months ago
README.md Go 1.18 update, added README instructions, extend mime types 1 year ago
docker-compose.yml Added EXTRA_CMDLINE= to .env 1 year ago
go.mod Fix referer, updated dependencies 10 months ago
go.sum Fix referer, updated dependencies 10 months ago
schema.sql Binary path 1 year ago

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"