assemblyline.sh

Environment variables

lib-factory reads these from process.env. The factory's src/index.js loads them from .env at the factory root (import 'dotenv/config'); the factory command loads the same file.

VariableRequiredDefaultWhat it does
ORCHESTRATOR_API_KEYyesThe Orchestrator API key. It also names the organisation.
ORCHESTRATOR_API_SECRETyesThe Orchestrator API secret
FACTORY_LOCATIONyesWhere this factory session runs. The Orchestrator sends it only runs of stations on lines whose location matches. One session per organisation and location.
ORCHESTRATOR_URLnohttps://orchestrator.assemblyline.shThe Orchestrator to talk to; http://localhost:3000 for one on your machine
POLL_INTERVAL_MSno2000How often the session asks the Orchestrator for a run, in milliseconds. A value that doesn't parse as a number, or 0, means the default.
  • startFactory() checks the required three at start and exits naming any that is missing.
  • npx factory stations run uses the key, the secret and ORCHESTRATOR_URL to read the station's config, and doesn't read FACTORY_LOCATION. With --empty, it calls the Orchestrator for nothing.
  • Your stations' own variables, such as an API key for a system they call, go in the same .env and are read by your code: see Give stations their credentials.

al-orc and al-control don't read .env: they keep their own config files, in al-orc and al-control.