# Database used by ThingsBoard, can be either local (local HSQLDB), postgres (PostgreSQL), cassandra (Cassandra).
# In case of postgres or cassandra corresponding docker service will be deployed (see docker-compose.postgres.yml, docker-compose.cassandra.yml for details).
This folder containing scripts and Docker Compose configurations to run ThingsBoard in Microservices mode.
## Prerequisites
ThingsBoard Microservices are running in dockerized environment.
Before starting please make sure [Docker CE](https://docs.docker.com/install/) and [Docker Compose](https://docs.docker.com/compose/install/) are installed in your system.
## Installation
Execute the following command to run DataBase installation:
Before performing initial installation you can configure the type of database to be used with ThinsBoard.
In order to set database type change the value of `DATABASE` variable in `.env` file to one of the following:
- `local` - use local embedded HSQLDB database;
- `postgres` - use PostgreSQL database;
- `cassandra` - use Cassandra database;
**NOTE**: In case of `postgres` or `cassandra` corresponding docker service will be deployed (see `docker-compose.postgres.yml`, `docker-compose.cassandra.yml` for details).
Execute the following command to run installation:
- `FROM_VERSION` - from which version upgrade should be started.
Where:
- `FROM_VERSION` - from which version upgrade should be started. See [Upgrade Instructions](https://thingsboard.io/docs/user-guide/install/upgrade-instructions) for valid `fromVersion` values.
@ -8,6 +8,7 @@ This project provides the build for the ThingsBoard single docker images.
## Running
In this example `thingsboard/tb` image will be used. You can choose any other images with different databases (see above).
Execute the following command to run this docker directly:
`
@ -23,9 +24,9 @@ Where:
- `-p 5683:5683` - connect local port 5683 to exposed internal COAP port 5683
- `-v ~/.mytb-data:/data` - mounts the host's dir `~/.mytb-data` to ThingsBoard DataBase data directory
- `--name mytb` - friendly local name of this machine
- `thingsboard/tb` - docker image
- `thingsboard/tb` - docker image, can be also `thingsboard/tb-postgres` or `thingsboard/tb-cassandra`
After executing this command you can open `http://{yor-host-ip}:9090` in you browser. You should see ThingsBoard login page.
After executing this command you can open `http://{yor-host-ip}:9090` in you browser (for ex. `http://localhost:9090`). You should see ThingsBoard login page.
**NOTE**: if you use different database change image name in all commands from `thingsboard/tb` to `thingsboard/tb-postgres` or `thingsboard/tb-cassandra` correspondingly.
**NOTE**: replace host's directory `~/.mytb-data` with directory used during container creation.