Skip to main content
Version: 1.1.0

Installation

Local Installation

Clone the repository, install dependencies and run:

yarn install
yarn dev

Docker Installation

Build and run with Docker:

# Build Docker image
docker build -t storage-service:latest .

# Copy and configure your environment file
cp .env.example .env
# Edit .env and set your API_KEY and other configuration

# Run a container based on the storage-service image built in the previous step
docker run -d --env-file .env -p 3333:3333 \
-v $(pwd)/uploads:/app/src/uploads:rw \
storage-service:latest

Note: Ensure your .env file contains the required API_KEY variable. The service will not start without it.

Cloud Provider Setup

Google Cloud Storage

Update your .env file:

STORAGE_TYPE=gcp
GOOGLE_APPLICATION_CREDENTIALS=/tmp/service-account-file.json

Then run the container, mounting your service account file:

docker run -d --env-file .env -p 3333:3333 \
-v /path/to/local/gcp/service-account-file.json:/tmp/service-account-file.json \
storage-service:latest

Amazon Web Services

Update your .env file with AWS credentials:

STORAGE_TYPE=aws
REGION=ap-southeast-2
AWS_ACCESS_KEY_ID=your-aws-access-key-id
AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
AVAILABLE_BUCKETS=verifiable-credentials,private-verifiable-credentials,epcis-events

Then run the container:

docker run -d --env-file .env -p 3333:3333 storage-service:latest

Digital Ocean

Update your .env file with Digital Ocean credentials:

STORAGE_TYPE=digital_ocean
REGION=syd1
AWS_ACCESS_KEY_ID=your-do-access-key-id
AWS_SECRET_ACCESS_KEY=your-do-secret-access-key
AVAILABLE_BUCKETS=verifiable-credentials,private-verifiable-credentials,epcis-events

Then run the container:

docker run -d --env-file .env -p 3333:3333 storage-service:latest