Refactor environment and configuration management

- Updated the project structure to store configuration files (.env, models.yaml, extensions.yaml) in the project root instead of the user's home directory.
- Enhanced the setup process to automatically copy example files to the project root on first run.
- Implemented a migration function to transfer legacy configuration files from the user's home directory to the new project structure.
- Revised documentation to reflect changes in file locations and setup instructions.
- Improved code readability and maintainability by refactoring path management functions.
This commit is contained in:
Leonid Pershin
2026-08-21 03:20:18 +03:00
parent c2ca39a4a7
commit 343f741baa
22 changed files with 202 additions and 90 deletions
+3 -3
View File
@@ -13,7 +13,7 @@
## Манифест
Пример: [`extensions.example.yaml`](../extensions.example.yaml). Рабочая копия: `~/.gpu-rent/extensions.yaml` (или `EXTENSIONS_MANIFEST`).
Пример: [`extensions.example.yaml`](../extensions.example.yaml). Рабочая копия: `extensions.yaml` в корне репо (или `EXTENSIONS_MANIFEST`).
```yaml
swarmui:
@@ -52,7 +52,7 @@ Idle-killer ещё не вооружён. Git нужен на VM (`apt` в boots
Публичный HTTPS без секретов. Приватный репозиторий:
- `GIT_TOKEN` в `.env` (GitHub: `x-access-token`; GitLab: `oauth2` / PAT). CLI подставляет в URL **только на VM**, не пишет токен в yaml и не в cloud-init.
- Либо отдельный deploy key `~/.gpu-rent/git_deploy` — v1.1, не обязательно сейчас.
- Либо отдельный deploy key `<repo>/.gpu-rent/git_deploy` — v1.1, не обязательно сейчас.
Не использовать `git://`. Только `https://` и `git@` + ключ.
@@ -63,6 +63,6 @@ Idle-killer ещё не вооружён. Git нужен на VM (`apt` в boots
## Конфиг
```env
EXTENSIONS_MANIFEST= # пусто = ~/.gpu-rent/extensions.yaml
EXTENSIONS_MANIFEST= # пусто = <repo>/extensions.yaml
GIT_TOKEN= # опционально, для приватных https
```