Sign inSign up

rocketbaseio/datenort

By rocketbaseio

•Updated about 3 years ago

a file management api written in node

Image
0

451

rocketbaseio/datenort repository overview

⁠Datenort

logo

build docker github mit

⁠Sourcecode

github.com/rocketbase-io/datenort⁠

⁠Features

  • file upload
  • extraction of meta data
  • image processing (blurhash and image colors)
  • works with any filetype
  • storage implementation with AWS S3

⁠Quickstart

# install dependencies
$ npm run install

# serve
$ npm run start

# build for production
$  npm run build
$  npm run start:prod

⁠Running as a Docker

docker run -it -p 8081:8081 rocketbaseio/datenort:latest

⁠Datamodel

Structure is not getting generated automatically. Please create it by your own. Currently build for PostgreSQL.

create table asset (
    id uuid not null,
    url_path text,
    bucket varchar(100),
    type varchar(128) not null,
    blur_hash varchar(100),
    created timestamptz not null default current_timestamp,
    analyzed timestamptz,
    original_filename text not null,
    file_size integer not null,
    reference_url text,
    image_width integer,
    image_height integer,
    color_palette jsonb,

    constraint asset_pkey primary key (id)
);

⁠Configuring the Server

VariableDescriptionNecessary?
DATABASE_URLUsed for the PostgresDB Connection.
Syntax: postgres://{user}:{password}@{hostname}:{port}/{database-name}
Yes
TOKEN_AUTHORIZATION_URLIt's used for the JWT authorization to protect the endpoints (recommended)Depends
AWS_ACCESS_KEY_IDAWS S3 Bucket authorizationYes
AWS_SECRET_ACCESS_KEYAWS S3 Bucket authorizationYes
PORTSets the port of the server
Default: 8083
Docker Expose 8081
No
NB_INSTANCESDetermines the number of instances run in the cluster
Default: 2
No
MAX_MEMORY_RESTARTDetermines the maximum memory for when the application should restart to avoid memory leaks
Default: 1024M
NODE_ENVAlso determines the instances in the cluster. When it's set to "test", 1 instance will be run.No
NODE_ARGSSet custom arguments for NodeJS
Default: --max_old_space_size=1800
No

Tag summary

Content type

Image

Digest

sha256:7422cf907…

Size

348.2 MB

Last updated

about 3 years ago

docker pull rocketbaseio/datenort