Run FormComposer tasks
To create and launch a FormComposer task, first create your JSON form configuration, and then run the below commands.
Once your Task launches, your console will display you URLs like this: http://<YOUR_DOMAIN>/?worker_id=x&assignment_id=1
.
- If you're doing local testing with
local
architect andinhouse
provider, your URLs will start withhttp://localhost:3000/
. To access your Task units as a worker, just paste one of these URLs into your browser.- If running with Docker, you will need to replace port
3000
in the console URLs with the remapped port (e.g. for3001:3000
it will be3001
).
- If running with Docker, you will need to replace port
- If you're running with a "real" provider, to access your Task units you will need to log into the provider's platform as a worker, and find them there.
With docker-compose
You can launch FormComposer inside a Docker container:
- Prepare configs using
form_composer config
command:
docker-compose -f docker/docker-compose.dev.yml run \
--build \
--rm mephisto_dc \
mephisto form_composer config --extrapolate-token-sets
- Run composer itself using
form_composer
command:
docker-compose -f docker/docker-compose.dev.yml run \
--build \
--publish 8081:8000 \
--publish 3001:3000 \
--rm mephisto_dc \
mephisto form_composer
Without docker-compose
First ensure that mephisto package is installed locally - please refer to Mephisto's main doc.
Once that is done, run form_composer config
command if needed, followed by form_composer
command:
# Configure command (for details, see "form_composer config command" page)
mephisto form_composer config --extrapolate-token-sets
# Run commands
mephisto form_composer
mephisto form_composer --task-data-config-only
mephisto form_composer --conf my-yaml-config
where
-o/--task-data-config-only
- validate only final data config-c/--conf
- YAML config name (analog ofconf
option in raw python run script)