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.
| Variable | Required | Default | What it does |
|---|---|---|---|
ORCHESTRATOR_API_KEY | yes | The Orchestrator API key. It also names the organisation. | |
ORCHESTRATOR_API_SECRET | yes | The Orchestrator API secret | |
FACTORY_LOCATION | yes | Where this factory session runs. The Orchestrator sends it only runs of stations on lines whose location matches. One session per organisation and location. | |
ORCHESTRATOR_URL | no | https://orchestrator.assemblyline.sh | The Orchestrator to talk to; http://localhost:3000 for one on your machine |
POLL_INTERVAL_MS | no | 2000 | How 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 runuses the key, the secret andORCHESTRATOR_URLto read the station's config, and doesn't readFACTORY_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
.envand 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.