Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 1.23 KB

docker.md

File metadata and controls

20 lines (14 loc) · 1.23 KB

Docker setup

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.

Building different survey images

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.

Building a container for a survey

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.

Building everything

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.