One-command local ETM: ETEngine, ETModel, Collections and MyETM plus their databases on Docker, with a managed dev-shell container so the toolchain is maintained centrally instead of per laptop. macOS only.
- Docker Desktop, running. Settings → Resources: at least 8 GB memory, 40 GB disk image size. The stack's images and volumes come to roughly 10 GB; the rest is headroom for rebuilds and Docker's build cache, which can grow over time.
git, with an SSH key added to your GitHub account- every repo below is cloned over
git@github.com:.
- every repo below is cloned over
- Ports 3000, 3001, 3002 and 3005 free - if anything else is listening on these (e.g. a natively-running ETM), ETLauncher will not work.
Your repositories should be flat siblings, inside one parent directory with no subfolders:
~/ETM/
├── etengine/
├── etmodel/
├── etsource/
├── multi-year-charts/
├── my-etm/
└── ETLauncher/ ← this repo
Note: You can call the parent directory whatever you want.
If you already have the repositories, inside your parent directory run:
git clone git@github.com:quintel/ETLauncher.gitmkdir ~/ETM && cd ~/ETM
git clone git@github.com:quintel/etengine.git
git clone git@github.com:quintel/etmodel.git
git clone git@github.com:quintel/etsource.git
git clone git@github.com:quintel/multi-year-charts.git
git clone git@github.com:quintel/my-etm.git
git clone git@github.com:quintel/ETLauncher.gitSome ETSource data is encrypted. If you have the decryption password, place it
at etsource/.password. Without it the stack still runs only certain datasets are not accessible.
Each app needs its own hostname which needs to be added to /etc/hosts. Add them with the following command:
grep -q myetm.local.energytransitionmodel.com /etc/hosts || sudo sh -c 'echo "127.0.0.1 myetm.local.energytransitionmodel.com etmodel.local.energytransitionmodel.com etengine.local.energytransitionmodel.com collections.local.energytransitionmodel.com" >> /etc/hosts'You will be prompted for your password - it is your computer's password. You will not see anything when you type.
cd ~/ETM/ETLauncher
./bin/upBuilds images, creates databases, seeds users and OAuth apps, starts everything. It will take several minutes on the first run.
Open each app and log in - the same thing you'd already do with a local ETM,
just at these hosts. Collections needs about a minute after bin/up finishes
(it installs its packages on first boot), so give it a moment if it refuses the
connection:
Logins (see CREDENTIALS.md): admin admin@etm.local /
etm-admin, user user@etm.local / etm-user.
- After
git pullor code changes: app code, views, routes, JS, andetsourcebranch switches reload automatically - most pulls need nothing further. Run./bin/updateonly if aGemfileorpackage.jsonchanged; it's safe to run anytime (no-ops if nothing changed). Add--buildonly if a Dockerfile or system package changed. - Migrations:
./bin/updatedoesn't run them. In Docker Desktop: Containers → etengine (or another app) → Exec, then runbin/rails db:migrate. - Stop / start: in Docker Desktop, Containers → etlauncher, use the
Stop/Start controls on the project or a single service. Data persists -
no need to re-run
bin/up. - Run app commands (e.g. a Rails console): in Docker Desktop,
Containers → service → Exec, then run the command, e.g.
bin/rails consoleonetengine. - View logs: in Docker Desktop, Containers → service → Logs.
bin/upfails: port already in use. Something is listening on 3000/3001/3002/3005 - either the stack is already up (in which case there's nothing to do), or a native ETM install is running. Stop it and re-run..env is missing variable(s)...warning..envis created once from.env.exampleand never overwritten - a variable added to.env.examplelater doesn't reach your.envautomatically. Add it by hand.- Login or redirect breaks. Always open apps at
<service>.local.energytransitionmodel.com:<port>, never barelocalhost:<port>- the OAuth callback targets the configured host. ../etsource/.password is missingwarning. Expected without the decryption password - some scenario calculations will fail; everything else works.bin/upfails part-way through the build. Usually disk space.bin/upprints Docker's disk usage before building, so check those numbers; reclaim space withdocker system pruneor raise the disk image size in Docker Desktop → Settings → Resources.
Contributing to ETLauncher, or editing a gem (merit, atlas, fever,
refinery, turbine, identity_rails)? See
docs/development.md.