easy-devops 1.0.2 โ 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -8
- package/install.ps1 +2 -2
- package/package.json +1 -1
- package/src/core/db.js +24 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="dashboard/public/img/icon.png" alt="Easy DevOps" width="100" />
|
|
2
|
+
<img src="src/dashboard/public/img/icon.png" alt="Easy DevOps" width="100" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
# Easy DevOps
|
|
@@ -12,6 +12,8 @@ A unified DevOps management tool with interactive CLI and web dashboard for mana
|
|
|
12
12
|
|
|
13
13
|
No external ACME binaries required โ SSL certificates are issued via [`acme-client`](https://www.npmjs.com/package/acme-client) (pure Node.js, Let's Encrypt).
|
|
14
14
|
|
|
15
|
+
> **Tip:** Two CLI commands are available: **`easy-devops`** (full name) and **`ezz`** (short alias). Both are registered in the npm bin and do exactly the same thing.
|
|
16
|
+
|
|
15
17
|
## Features
|
|
16
18
|
|
|
17
19
|
- **๐ฅ๏ธ Interactive CLI** โ Arrow-key menus with real-time status indicators
|
|
@@ -38,6 +40,7 @@ If you have **Node.js 18+** installed, run:
|
|
|
38
40
|
|
|
39
41
|
```bash
|
|
40
42
|
npm install -g easy-devops && easy-devops
|
|
43
|
+
# Short alias also available: ezz
|
|
41
44
|
```
|
|
42
45
|
|
|
43
46
|
If you **don't have Node.js** yet, use the bootstrap installer:
|
|
@@ -77,7 +80,7 @@ powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri 'https://raw
|
|
|
77
80
|
|
|
78
81
|
```bash
|
|
79
82
|
npm install -g easy-devops
|
|
80
|
-
easy-devops
|
|
83
|
+
easy-devops # or: ezz
|
|
81
84
|
```
|
|
82
85
|
|
|
83
86
|
### From Source
|
|
@@ -86,7 +89,7 @@ easy-devops
|
|
|
86
89
|
git clone https://github.com/omar00050/Easy-DevOps.git
|
|
87
90
|
cd Easy-DevOps
|
|
88
91
|
npm install
|
|
89
|
-
npm start
|
|
92
|
+
npm start # or: easy-devops / ezz
|
|
90
93
|
```
|
|
91
94
|
|
|
92
95
|
## Quick Start
|
|
@@ -95,7 +98,10 @@ npm start
|
|
|
95
98
|
# Start the interactive CLI
|
|
96
99
|
easy-devops
|
|
97
100
|
|
|
98
|
-
#
|
|
101
|
+
# Short alias โ same thing, faster to type
|
|
102
|
+
ezz
|
|
103
|
+
|
|
104
|
+
# Or run without installing
|
|
99
105
|
npx easy-devops
|
|
100
106
|
```
|
|
101
107
|
|
|
@@ -104,7 +110,7 @@ npx easy-devops
|
|
|
104
110
|
### CLI Overview
|
|
105
111
|
|
|
106
112
|
```
|
|
107
|
-
โโโโโโโโโโโโโโโโ Easy DevOps v1.0.
|
|
113
|
+
โโโโโโโโโโโโโโโโ Easy DevOps v1.0.2
|
|
108
114
|
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ
|
|
109
115
|
โโโโโโ โโโโ CLI & Web Dashboard
|
|
110
116
|
โโโโโโ โโโโ Nginx ยท SSL ยท Domains ยท Node.js
|
|
@@ -242,7 +248,9 @@ Default credentials:
|
|
|
242
248
|
| **Nginx** | Start/stop controls, config editor, error logs |
|
|
243
249
|
| **SSL** | Certificate list, renewal actions, expiry badges |
|
|
244
250
|
| **Domains** | Add/edit form with collapsible sections, table view |
|
|
245
|
-
| **Settings** | Port, password, directory configuration |
|
|
251
|
+
| **Settings** | Port, password, directory configuration, Linux permissions setup |
|
|
252
|
+
|
|
253
|
+
> **Linux users:** After launching the dashboard for the first time, open **Settings โ Linux Permissions** and click **Setup Permissions**. This writes `/etc/sudoers.d/easy-devops` with NOPASSWD rules for `systemctl` so nginx start/stop/reload/restart work from the dashboard without a terminal. Without this step, nginx service control will return "Linux permissions not configured" errors.
|
|
246
254
|
|
|
247
255
|
---
|
|
248
256
|
|
|
@@ -267,12 +275,18 @@ The dashboard exposes RESTful API endpoints:
|
|
|
267
275
|
| `/api/ssl/create-confirm` | POST | Confirm DNS challenge |
|
|
268
276
|
| `/api/ssl/renew/:domain` | POST | Renew certificate |
|
|
269
277
|
| `/api/settings` | GET/POST | Dashboard settings |
|
|
278
|
+
| `/api/settings/permissions` | GET | Linux sudo permissions status |
|
|
279
|
+
| `/api/settings/permissions/setup` | POST | Configure NOPASSWD sudoers (Linux) |
|
|
270
280
|
|
|
271
281
|
---
|
|
272
282
|
|
|
273
283
|
## Configuration
|
|
274
284
|
|
|
275
|
-
All configuration is stored in
|
|
285
|
+
All configuration is stored in a persistent user directory (never inside the npm package, so it survives updates):
|
|
286
|
+
|
|
287
|
+
**Database location:**
|
|
288
|
+
- Linux/macOS: `~/.config/easy-devops/easy-devops.sqlite`
|
|
289
|
+
- Windows: `%APPDATA%\easy-devops\easy-devops.sqlite`
|
|
276
290
|
|
|
277
291
|
| Key | Contents |
|
|
278
292
|
|-----|----------|
|
|
@@ -349,7 +363,7 @@ cd Easy-DevOps
|
|
|
349
363
|
npm install
|
|
350
364
|
|
|
351
365
|
# Run CLI
|
|
352
|
-
npm start
|
|
366
|
+
npm start # or: easy-devops / ezz
|
|
353
367
|
|
|
354
368
|
# Run dashboard
|
|
355
369
|
npm run dashboard
|
package/install.ps1
CHANGED
|
@@ -752,11 +752,11 @@ if ($allOK) {
|
|
|
752
752
|
Write-Host " All steps completed successfully!" -ForegroundColor Green
|
|
753
753
|
Write-Host ""
|
|
754
754
|
Write-Host " Run the CLI:" -ForegroundColor White
|
|
755
|
-
Write-Host " easy-devops" -ForegroundColor Cyan
|
|
755
|
+
Write-Host " easy-devops or ezz" -ForegroundColor Cyan
|
|
756
756
|
} else {
|
|
757
757
|
Write-Host " Some steps need attention -- see warnings above." -ForegroundColor Yellow
|
|
758
758
|
Write-Host ""
|
|
759
759
|
Write-Host " Fallback:" -ForegroundColor White
|
|
760
|
-
Write-Host " node cli/index.js" -ForegroundColor Cyan
|
|
760
|
+
Write-Host " node src/cli/index.js" -ForegroundColor Cyan
|
|
761
761
|
}
|
|
762
762
|
Write-Host ""
|
package/package.json
CHANGED
package/src/core/db.js
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
import { GoodDB, SQLiteDriver } from 'good.db';
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import path from 'path';
|
|
4
|
+
import os from 'os';
|
|
4
5
|
import { fileURLToPath } from 'url';
|
|
5
6
|
|
|
6
7
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
|
|
8
|
+
|
|
9
|
+
// Store the database in the user's home directory so it survives npm updates.
|
|
10
|
+
// Linux/macOS: ~/.config/easy-devops/
|
|
11
|
+
// Windows: %APPDATA%\easy-devops\ (falls back to home dir if APPDATA unset)
|
|
12
|
+
const DATA_DIR = process.platform === 'win32'
|
|
13
|
+
? path.join(process.env.APPDATA || os.homedir(), 'easy-devops')
|
|
14
|
+
: path.join(os.homedir(), '.config', 'easy-devops');
|
|
15
|
+
|
|
8
16
|
const DB_PATH = path.join(DATA_DIR, 'easy-devops.sqlite');
|
|
9
17
|
|
|
18
|
+
// โโโ One-time migration from old package-relative location โโโโโโโโโโโโโโโโโโโ
|
|
19
|
+
const OLD_DATA_DIR = path.join(__dirname, '..', '..', 'data');
|
|
20
|
+
const OLD_DB_PATH = path.join(OLD_DATA_DIR, 'easy-devops.sqlite');
|
|
21
|
+
function migrateIfNeeded() {
|
|
22
|
+
try {
|
|
23
|
+
if (fs.existsSync(OLD_DB_PATH) && !fs.existsSync(DB_PATH)) {
|
|
24
|
+
fs.mkdirSync(DATA_DIR, { recursive: true });
|
|
25
|
+
fs.copyFileSync(OLD_DB_PATH, DB_PATH);
|
|
26
|
+
// Rename old file so migration doesn't run again
|
|
27
|
+
fs.renameSync(OLD_DB_PATH, OLD_DB_PATH + '.migrated');
|
|
28
|
+
}
|
|
29
|
+
} catch { /* non-fatal โ new install will start fresh */ }
|
|
30
|
+
}
|
|
31
|
+
migrateIfNeeded();
|
|
32
|
+
|
|
10
33
|
try {
|
|
11
34
|
fs.mkdirSync(DATA_DIR, { recursive: true });
|
|
12
35
|
} catch (err) {
|