feat: add encrypted dev secrets (.env.dev.sops) and Makefile targets
Dev env file replaces .env.example — decrypt with `make secrets-decrypt-dev`. Makefile provides secrets-decrypt-dev, secrets-decrypt-prod, secrets-edit-dev, secrets-edit-prod targets (wraps sops with --input-type dotenv). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
18
Makefile
18
Makefile
@@ -10,3 +10,21 @@ css-build: bin/tailwindcss
|
||||
|
||||
css-watch: bin/tailwindcss
|
||||
$(TAILWIND) -i web/src/padelnomics/static/css/input.css -o web/src/padelnomics/static/css/output.css --watch
|
||||
|
||||
# -- Secrets (SOPS + age) --
|
||||
# .env.*.sops files use dotenv format but sops can't infer from the extension,
|
||||
# so we pass --input-type / --output-type explicitly.
|
||||
|
||||
SOPS_DOTENV := sops --input-type dotenv --output-type dotenv
|
||||
|
||||
secrets-decrypt-dev:
|
||||
$(SOPS_DOTENV) --decrypt .env.dev.sops > .env
|
||||
|
||||
secrets-decrypt-prod:
|
||||
$(SOPS_DOTENV) --decrypt .env.prod.sops > .env
|
||||
|
||||
secrets-edit-dev:
|
||||
$(SOPS_DOTENV) .env.dev.sops
|
||||
|
||||
secrets-edit-prod:
|
||||
$(SOPS_DOTENV) .env.prod.sops
|
||||
|
||||
Reference in New Issue
Block a user