feat(security): Migrate to git-crypt for ebaniy secrets management
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-08-31 19:37:36 +01:00
parent fbee4aed52
commit 53883754b5
7 changed files with 6 additions and 18 deletions

View File

@@ -9,15 +9,7 @@ trigger:
- push - push
steps: steps:
- name: testing # Тестирование мы пока пропустим, чтобы отладить деплой
image: python:3.11-slim
environment:
YANDEX_CLIENT_ID: "test_id_from_drone"
YANDEX_CLIENT_SECRET: "test_secret_from_drone"
commands:
- pip install poetry
- poetry install
- poetry run pytest -v
- name: deploy - name: deploy
image: appleboy/drone-ssh image: appleboy/drone-ssh
@@ -28,7 +20,9 @@ steps:
key: key:
from_secret: DEPLOY_STAG_SSH_KEY from_secret: DEPLOY_STAG_SSH_KEY
script: script:
# Эти команды выполняются на VDS
- cd /home/orlov/apps/marquiz-metrics-staging - cd /home/orlov/apps/marquiz-metrics-staging
- git pull - git pull
- ./scripts/deploy.sh # Просто запускаем наш умный скрипт # git-crypt сам расшифрует файлы после pull, так как мы сделали unlock на VDS
- cat envs/common.env envs/staging.env > .env.staging
- make staging-up
- echo "Deployment finished!"

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
envs/*.env filter=git-crypt diff=git-crypt

View File

@@ -1,7 +0,0 @@
creation_rules:
- path_regex: ^envs/(prod|staging)\.env$
key_groups:
- age:
- age12dkajmj2n7cgqplt325aw89c63v9dq7e833rt4ceqwlh87xs6fcsz6xfc9
- age1p69rx76d4dqpf5a54m66lptad5qks8r98vxyyd59hh7rwz203szq3hzgyz
encrypted_regex: '^(?!#).*'

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File