This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/README.md

2.0 KiB

Devicehub

Devicehub is a distributed IT Asset Management System focused in reusing devices, created under the project eReuse.org

This README explains how to install and use Devicehub. The documentation explains the concepts and the API.

Devicehub is built with Teal and Flask.

Installing

Please visit the Manual Installation for understand how you can install locally or deploy in a server.

Docker

You have a docker compose file for to do a automated deployment. In the next steps we can see as run and use.

  1. Download the sources:
  git clone https://github.com/eReuse/devicehub-teal.git
  cd devicehub-teal
  1. You need decide one dir in your system for share documents between your system and the dockers. For us only as example we use "/tmp/dhub/" and need create it:
  mkdir /tmp/dhub
  1. Copy your snapshots in this directory. If you don't have any snapshots copy one of the example directory.
  cp examples/snapshot01.json /tmp/dhub
  1. Modify the file with environment variables in the file .env You can see one example in examples/env If you don't have one please copy the examples/env file and modify the basic vars
  cp examples/env.example .env

You can use this parameters for default as a test, but you need add values in this three variables:

  API_DLT
  API_DLT_TOKEN
  API_RESOLVER
  1. run the dockers:
  docker compose up

For stop the docker you can use Ctl+c and if you run again "compose up" you maintain the datas and infrastructure.

  1. If you want down the volumens and remove the datas, you can use:
  docker compose down -v
  1. If you want to enter a shell inside a new container:
  docker run -it --entrypoint= ${target_docker_image} bash

If you want to enter a shell on already running container:

  docker exec -it ${target_docker_image} bash

For to know the valid value for ${target_docker_image} you can use:

  docker ps
`