Content-addressable storage serving of blobs. https://radio.animebits.moe/player/hash/b9dbb31bda75
Go to file
2022-05-31 09:40:19 +02:00
scripts Updated dependencies, replace command with entrypoint, support setting SRG tasklimit directly. 2022-05-31 09:40:19 +02:00
.drone.yml Verbose build, AMD64 features 2022-01-18 11:56:39 +01:00
.env.example Updated dependencies, replace command with entrypoint, support setting SRG tasklimit directly. 2022-05-31 09:40:19 +02:00
.gitignore Initial commit. Working file serve, and signatures! 2022-01-16 02:06:56 +01:00
docker-compose.yml Updated dependencies, replace command with entrypoint, support setting SRG tasklimit directly. 2022-05-31 09:40:19 +02:00
Dockerfile Updated dependencies, replace command with entrypoint, support setting SRG tasklimit directly. 2022-05-31 09:40:19 +02:00
go.mod Updated dependencies, replace command with entrypoint, support setting SRG tasklimit directly. 2022-05-31 09:40:19 +02:00
go.sum Updated dependencies, replace command with entrypoint, support setting SRG tasklimit directly. 2022-05-31 09:40:19 +02:00
LICENSE Update LICENSE year 2022-01-16 13:37:30 +01:00
OrbitalBeat.go Added video mime types 2022-03-11 18:27:03 +01:00
README.md Go 1.18 update, added README instructions, extend mime types 2022-02-08 19:31:41 +01:00
schema.sql Binary path 2022-01-16 11:07:35 +01:00

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"