make env-prepare
Ensure the workspace .env exists and is correct.
Usage
make env-prepare
What it does
env-prepare is exactly fix-workdir followed by
fix-app.
fix-workdir. If../.envdoes not exist, it is created from the committedsplent_cli/.env.exampletemplate; thenSPLENT_HOST_PROJECT_DIRis set to the real host path andWORKING_DIRto/workspace.fix-app. IfSPLENT_APPpoints to a product folder that no longer exists, it is cleared (back to detached mode).
The result is a correct .env, every time, with no chicken-and-egg problem. The
template is committed to the repo, so creating the file never depends on the
container or on the .env itself.
When to use
You normally never call it directly. make setup and
make docker-up run it for you. Call it on its own to
bootstrap a .env on a fresh clone without starting Docker.
env-prepare does not fill in your GITHUB_TOKEN / TWINE_PASSWORD. Those
are secrets. Open ../.env and add them by hand (or with
splent env:set from inside the container).
Related
make env-check. Validate without changing anything.make fix-env. Repair, then validate.