Skip to content

Docker Deployment

1.4

When deploying NF using Docker (or other container runtimes), two containers are required: one running the Normal Framework and one running Redis.

Quick Start

The quickest way to get started is by using the docker-compose file provided as part of the SDK.

Networking

The Normal Framework container requires network_mode: host to properly process BACnet traffic. This limits the ability to use other Docker networking primitives to isolate the container.

After installation, the API Gateway and Management Console are exposed on port tcp/8080.

Filesystem

"Hard state" is stored in Redis, which should be backed up. NF also requires a writable, persistent volume for "soft state," such as data being buffered before being sent out, low-level configuration settings, and other data that should persist across reboots.

This state is stored within /var/nf in the container. It is recommended to volume-mount this directory so that it persists across restarts.

For security, you may mount the container volume as read-only. In this case, you must set S6_READ_ONLY_ROOT=1 and mount /run and /etc/nginx/conf.d/ as tmpfs mounts.

Initialization and Configuration

Within the container, NF uses s6-rc to start services and ensure they are restarted on error. You may inspect the s6 configuration by looking in /etc/s6-overlay. Although detailed documentation is beyond the scope of this article, it is possible to alter the environment for individual services by adjusting the contents of this directory. Additionally, environment variables applied to the container (i.e., on the Docker command line) are passed to all services.

Redis

Normal Framework includes a build of Redis Server that has been validated to work correctly. You may also build your own; there are no modifications required. NF requires RediSearch and RedisTimeSeries to be installed on the Redis instance.

Redis stores its data in /data; this directory should be volume-mounted and backed up.