Skip to content

Installation

Dudrie edited this page Oct 5, 2019 · 19 revisions

Requirements

  • Docker: The provided image from the release section is a docker image for Linux containers therefore you need Docker to be able to run it.
  • Docker-Compose: While technically not required it helps you to get up the container(s) more easily.

Installation

  1. Download the image from the release section.

  2. Download the sample configuration. See Sample config below for more information.

  3. Unzip both downloaded files into the same folder. Open a command shell in that folder afterwards.

  4. Adjust the docker-compose.yml by removing all services you don't want to use.

  5. Adjust the server's configuration in config/default.yml:

    • databaseURL: This needs to point to a MongoDB database which the server should use.
    • secret: Secret to use for encryption.
    • config: Contains the configuration for the MongoDB - mainly the user and password which the server should use to authenticate.

    While the most important configuration changes will be described here please have a look at the configuration documentation for a complete overview.

    If you want to use environment variables instead have a look at environment variables in the configuration documentation.

  6. Start the server (and all of the other wanted services) with

    docker-compose up -d
  7. The container listens (if you did not omit the ports property) to the port 8443. It should be available if the start up was successful.

Sample config

You find the following items in the sample configuration .zip file:

docker-compose file

This is a sample docker-compose file. It includes four services. However if you don't need all of them you can remove the not needed ones:

tms-server

Required

This is the container which the TMS will run in. There are two possible volumes:

  • <path-to-config>:/tms/server/config: (required) The complete configuration folder has to be put in /tms/server/config for the server to be able to use it. For more information see the configuration documentation.

  • <path-to-save-logs>:/tms/server/logs: All produces logs will be saved in /tms/server/logs. If you want to have them outside the container just add a volume linking to this folder.

If you are using a proxy like nginx you can omit the ports property from the service.

mongo

Required only if no other MongoDB instance is available

Container running a MongoDB inside. This is only needed if you don't provide an other MongoDB instance. It should be in the same network as the tms-server container. Make sure to change MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD.

nginx

Not required

If you want to use nginx but you don't have a nginx instance running you can use this service as a baseline. For more information see the Setup with nginx guide.

mongo-express

Not required

Container running an administrative webinterface for a MongoDB. Make sure this container is in the same network as mongo. You have to set the values of ME_CONFIG_MONGODB_ADMINUSERNAME and ME_CONFIG_MONGODB_ADMINPASSWORD to the same value as the MONGO_INITDB_ROOT_ values specified in mongo.

TLS / HTTPS

The TMS server itself does NOT support TLS / HTTPS. The reason why TLS had not (and still has not) have a high priority is simple: Most servers already use a proxy (like nginx) which handle SSL for all services running on the server. Furthermore, using a proxy is the recommended way of using an express server according to the express documentation;

If your server does not already use a proxy you should consider adding one. For more information on how to setup TMS with nginx see the Setup with Nginx guide.

However if you cannot (or don't want to) use a proxy on your server you can add the TLS support for express in a forked version of the repository.

Clone this wiki locally