Web server per gestire la nuova macchina di backup e storage.
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.
 
 
 
 
 
 
Antonio De Lucreziis c54bf850fa Some stylistic changes to pie charts and to the disk space widget 2 years ago
_frontend Some stylistic changes to pie charts and to the disk space widget 2 years ago
config More docker and deploy updates 2 years ago
database Routes refactor and object removal 2 years ago
scripts Updated scripts 2 years ago
server Routes refactor and object removal 2 years ago
serverinfo Refactor: changed some names, the router was the server all along 2 years ago
store Routes refactor and object removal 2 years ago
utils Prototype of DirStore and some routes for working with buckets 2 years ago
.dockerignore Updated .dockerignore 2 years ago
.gitignore Fixed wrong gitignore 2 years ago
Dockerfile More docker and deploy updates 2 years ago
README.md Added .env to volume bindings 2 years ago
deploy Added .env to volume bindings 2 years ago
go.mod Minor tweaks 2 years ago
go.sum Refactoring and dashboard state in DB 2 years ago
main.go Refactor: changed some names, the router was the server all along 2 years ago

README.md

PHC Storage

Web server per gestire la nuova macchina di backup e storage.

Architecture

  • _frontend/

    This is a Vite project for building all the static pages used by this app.

  • database/

    Module with a Database interface and two implementation: memDB is an in-memory database for testing purposes while sqliteDB is a wrapper for working with an SQLite database.

  • routes/

    Various functions for configuring all the server routes.

Usage

First install the required npm packages

$ cd _frontend
_frontend/ $ npm install

Development

# Development
$ MODE=dev go run -v .

# Development with watcher
$ fd -e go | MODE=dev entr -r go run -v .

Production

First build the _frontend/dist folder using

$ cd _frontend
$ npm run build

and then

# Production
$ go run -v .

Production with Docker

$ mkdir buckets.local/
$ cat <<EOF > database.local.json
{
    "prefixSize": 2,
    "dashboardState": {
        "widgets": []
    },
    "buckets": {},
    "api-keys": []
}
EOF
$ cat <<EOF > .env
MODE="production"
HOST=":4000"
ADMIN_PASSWORD="secret"
MONITOR_SCRIPTS_DIR="./scripts"
MONITOR_CACHE_TIMEOUT="10s"
EOF