Building Services

All Python FastIoT Services are built as docker images. Docker images are built via a Dockerfile. For all python services a multistage Dockerfile template will be used. As of today it supports the stages debug and release mode. In release mode all modules will be compiled via Nuitka and only the binary for the module will be placed inside the image.

The template can be found within the fastiot.cli at src/fastiot/cli/templates/docker-compose.yaml.j2. The template is used via the CLI and generates the Dockerfile in the build directory (typical build/docker) within your project. You may use the command fiot build --dry to only generate the docker files and not start the build immediately.

If you need your own Dockerfile just put a file called Dockerfile in your service directory next to run.py. This will be used if found and replace the template based dockerfile.