rpsofttower/tower

By rpsofttower

Updated 23 days ago

Tower configuration server

Image
Developer Tools

100K+

Tower Configuration Server

This image contains Tower Configuration Server. You can read more about Tower on the projects GitHub or documentation.

Image configuration

There are a few configuration variables that need to be set before starting Tower and this task can be done using two different mehods, mounting a configuration file or environment variables.

Mounting configuration files

The first one is by mounting configuration file during docker run. The configuration file in located in /home/tower/backend directory, so all you need to do is mount .env file, like this:

docker run -d -p 5000:5000 --name tower -v <<FULL_PATH>>/.env:/home/tower/backend/.env rpsofttower/tower:latest 

Be sure to change the <<FULL_PATH>> variable to correct path to your configuration files. A template of this file can be found in our GitHub repositiory

Using environment variables

The second option is a bit easier... All you need to do, is pass the configuration variables in environment variables, like this:

docker run -d -p 5000:5000 --name tower -e DATABASE_URL="mongodb://mongo_host:27017/production" rpsofttower/tower:latest

You can find all environment variables in this table:

Environment VariableDefault valueRequired
HOST0.0.0.0no
PORT3000no
LOG_LEVEL["log","error"]no
DATABASE_URL""yes
SECRET""no
TTL86400no
AUDIT_TTL1no
TOKEN_HEADERS["Authorization"]no
SSL_KEY_PATH""no
SSL_CERT_PATH""no
CORSfalseno

All the variables are described in the template file

Testing

For testing purposes you can use docker-compose to start both Tower and mongo:

version: "3.3"
services:
  tower:
    image: rpsofttower/tower:latest
    restart: always
    ports:
      - "3000:3000"
    environment:
      PORT: 3000
      DATABASE_URL: mongodb://mongo:27017/docker
    depends_on:
      - mongo
  mongo:
    image: mongo:6.0

Command docker-compose up will initialize Tower. Go to http://localhost:3000 in your browser to start using Tower.

Docker Pull Command

docker pull rpsofttower/tower