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:
Deeman
2026-02-23 17:01:28 +01:00
parent f735e36522
commit 04ef8deaa1
2 changed files with 89 additions and 0 deletions

View File

@@ -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