Skip to content

./stack init: create .env-backup and .env-notify when asked #3

Open

Description

@apankov

./stack init creates the machine's .env and every enabled stack's .env from their examples. Backups and alerts are optional, so it only prints optional, not created: .env-backup (cp .env-backup.example .env-backup && chmod 600 .env-backup) — one more manual step on every new machine that wants them.

What to build: ./stack init --with backup,notify (or a similar flag that cannot be mistaken for a stack name) also creates those two files from their examples, mode 600, never overwriting an existing one, and names their CHANGE_ME values like the others.

Where to look:

  • platform/bin/stack.sh, verb_init and init_create.
  • platform/bin/selftest.sh, block "== stack init".

Done when: a selftest check creates both on request, leaves them alone without the flag, and init fails while they still hold CHANGE_ME.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions