Flom can be deployed in a docker container that hosts both the app server and the database. It is set up such that different images can be built which host different surveys and each can be deployed on its own port.
Docker images can be built form the root of the project using yarn script runners. There are two build commands, one for building a container with a specific survey, and one for rebuiling the app completely.
yarn docker:build:survey <survey name>
makes a Docker container based on the specified <survey name>
.
Use this command if you are authoring a new survey. It won't change the application code, but only put the specified survey in a container tagged with the survey name. It will be faster than building all.
If no survey name is provided a generic container is produced that will list all surveys in the surveys directory.
yarn docker:build:all <survey name>
creates a docker container based on the <survey name>
specified, but also builds the client application for production.
This will take a few minutes to run.
Use this command if you are editing application code and want to try it in a container.