OrbitalBeat/README.md
DataHoarder dbcd5a6cc9
All checks were successful
continuous-integration/drone/push Build is passing
Go 1.18 update, added README instructions, extend mime types
2022-02-08 19:31:41 +01:00

1.6 KiB

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"