Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
LIPI_API_KEY=<lipi-api-key>

# Where DNA Spaces is the position provider, the following should be left as is
POSITION_PROVIDER_USERNAME=<username-here>
POSITION_PROVIDER_PASSWORD=<password-here>

Then use Use the environment variable file to start the lipi

For production: Start the service in the background, by adding the --detach option:

Code Block
languagebash
sudo docker run --detach --rm --name lipi \
 --env-file=lipi-docker-env-file \
 -p 443:8080 \
  gcr.io/mazemap-public-docker/lipi:latest

Special case: For debugging/testing: you can run without the --detach option to remain inside the docker context and see what is going in after starting it.

Code Block
languagebash
sudo docker run --rm --name lipi \
 --env-file=lipi-docker-env-file \
 -p 443:8080 \
  gcr.io/mazemap-public-docker/lipi:latest

Inspecting logs

Docker has a command to view the logs of containers running in the background: docker logs <container_name>.

By default this command prints everything logged since the container was started and then returns you to the command prompt. You may add the option --follow to see the log messages as they arrive. If the service has been running for a long time and you’re only interested in, say, messages from the last 5 minutes, use --since 5m. Putting it all together:

Code Block
sudo docker logs --since 5m --follow lipi

Start Server with local config.json file

This is a special case, the normal case for production use is to start the service in the background, as described further up in this document.

Code Block
languagebash
sudo docker run --rm --name lipi \
    --env-file=lipi-docker-env-file \
    -v <your-config-path>:/app/resources/local_config.json \
    -p 443:8080 \
    gcr.io/mazemap-public-docker/lipi:latest

...

Changes to the LIPI configuration can be applied by deleting the container:

Code Block
languagebash
sudo docker rm -f lipi

And then starting again it in the same way as normal.

...

  • LIPI_API_KEY - Api key from lipi config in Map Editor

  • LIPI_HTTP_SCHEME - The http protocol LIPI will run with (http or https)

  • POSITION_PROVIDER_USERNAME - Username of the position provider (CMX, Aruba ALE...)

  • POSITION_PROVIDER_PASSWORD - Password of the position provider (CMX, Aruba ALE...)

  • HTTP_PROXY_SCHEME - Proxy server protocol (http or https)

  • HTTP_PROXY_HOST - Host name of proxy server

  • HTTP_PROXY_PORT - Port number for proxy server

  • REQUIRE_API_KEY_IN_NOTIFICATIONS - If set to “yes”, rejects CMX notifications if they don’t have X-LIPI-API-Key header set to the value of LIPI_API_KEY. Added in 4.2.12.

Required

  • LIPI_API_KEY

  • POSITION_PROVIDER_USERNAME

  • POSITION_PROVIDER_PASSWORD

...

  • LIPI_HTTP_SCHEME='https'

    • Possible Values: http, https

  • REQUIRE_API_KEY_IN_NOTIFICATIONS='no'

Security and privacy considerations

The LIPI_HTTP_SCHEME should only be set to http for testing purposes, as this means that users' positions will be sent unencrypted between LIPI and the user devices.

The REQUIRE_API_KEY_IN_NOTIFICATIONS variable should be set to “yes” in production, otherwise it is theoretically possible for malicious users to pose as a CMX server and inject position and user data into the LIPI, which could cause service disruptions.