learnhouse 1.3.0 → 1.3.1
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 +39 -40
- package/dist/bin/learnhouse.js +1 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# LearnHouse CLI
|
|
2
2
|
|
|
3
|
-
The official LearnHouse CLI — deploy, manage, and operate your LearnHouse instance.
|
|
3
|
+
The official LearnHouse CLI — deploy, manage, and operate your LearnHouse instance.
|
|
4
4
|
|
|
5
5
|
<img width="915" height="871" alt="image" src="https://github.com/user-attachments/assets/957c6cea-3efb-4cab-a643-55df3ac4c6aa" />
|
|
6
6
|
|
|
@@ -20,82 +20,81 @@ curl -fsSL https://raw.githubusercontent.com/learnhouse/learnhouse/main/apps/cli
|
|
|
20
20
|
irm https://raw.githubusercontent.com/learnhouse/learnhouse/main/apps/cli/install.ps1 | iex
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
### Using npx
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
```bash
|
|
26
|
+
npx learnhouse@latest setup
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Install a specific version
|
|
26
30
|
|
|
27
31
|
```bash
|
|
28
|
-
npx learnhouse@
|
|
32
|
+
npx learnhouse@1.0.0 setup
|
|
29
33
|
```
|
|
30
34
|
|
|
31
35
|
## Requirements
|
|
32
36
|
|
|
33
37
|
- **Node.js** >= 18
|
|
34
|
-
- **Docker**
|
|
38
|
+
- **Docker**
|
|
35
39
|
|
|
36
40
|
## Commands
|
|
37
41
|
|
|
38
42
|
| Command | Description |
|
|
39
43
|
|---------|-------------|
|
|
40
|
-
| `learnhouse setup` | Interactive setup wizard
|
|
44
|
+
| `learnhouse setup` | Interactive setup wizard |
|
|
41
45
|
| `learnhouse start` | Start all services |
|
|
42
46
|
| `learnhouse stop` | Stop all services |
|
|
43
|
-
| `learnhouse
|
|
47
|
+
| `learnhouse update` | Update to the latest version |
|
|
48
|
+
| `learnhouse update --version <x.y.z>` | Update to a specific version |
|
|
49
|
+
| `learnhouse logs` | Stream service logs |
|
|
44
50
|
| `learnhouse config` | Show current configuration |
|
|
45
|
-
| `learnhouse
|
|
51
|
+
| `learnhouse status` | Show service status |
|
|
52
|
+
| `learnhouse health` | Run health checks |
|
|
53
|
+
| `learnhouse backup` | Backup database |
|
|
54
|
+
| `learnhouse restore <archive>` | Restore database from a backup |
|
|
46
55
|
| `learnhouse deployments` | View deployments and set resource limits |
|
|
47
|
-
| `learnhouse doctor` |
|
|
48
|
-
| `learnhouse shell` | Open
|
|
56
|
+
| `learnhouse doctor` | Diagnose common issues |
|
|
57
|
+
| `learnhouse shell` | Open a shell in a running container |
|
|
58
|
+
| `learnhouse env` | Edit environment variables |
|
|
59
|
+
| `learnhouse dev` | Start local development environment |
|
|
49
60
|
|
|
50
|
-
## Setup
|
|
61
|
+
## Setup
|
|
51
62
|
|
|
52
63
|
The setup wizard walks through:
|
|
53
64
|
|
|
54
65
|
1. **Install directory** — where files are generated
|
|
55
|
-
2. **Domain** — hostname, port, HTTPS/SSL
|
|
56
|
-
3. **Database & Redis** — local (Docker) or external
|
|
57
|
-
4. **Organization** — name for your
|
|
66
|
+
2. **Domain** — hostname, port, HTTPS/SSL
|
|
67
|
+
3. **Database & Redis** — local (Docker) or external
|
|
68
|
+
4. **Organization** — name for your instance
|
|
58
69
|
5. **Admin account** — email and password
|
|
59
|
-
6. **
|
|
60
|
-
|
|
61
|
-
You can go back to any previous step during setup, and edit any step from the summary before confirming.
|
|
70
|
+
6. **Features** — AI, email, S3, OAuth, Unsplash
|
|
62
71
|
|
|
63
|
-
|
|
72
|
+
You can go back to any step, and edit from the summary before confirming.
|
|
64
73
|
|
|
65
|
-
##
|
|
74
|
+
## Updating
|
|
66
75
|
|
|
67
76
|
```bash
|
|
68
|
-
#
|
|
69
|
-
npx learnhouse start
|
|
70
|
-
npx learnhouse stop
|
|
71
|
-
|
|
72
|
-
# View logs
|
|
73
|
-
npx learnhouse logs
|
|
74
|
-
|
|
75
|
-
# Backup database
|
|
77
|
+
# Back up first
|
|
76
78
|
npx learnhouse backup
|
|
77
79
|
|
|
78
|
-
#
|
|
79
|
-
npx learnhouse
|
|
80
|
-
|
|
81
|
-
# Open a shell in a container
|
|
82
|
-
npx learnhouse shell
|
|
80
|
+
# Update to latest
|
|
81
|
+
npx learnhouse update
|
|
83
82
|
|
|
84
|
-
#
|
|
85
|
-
npx learnhouse
|
|
83
|
+
# Or a specific version
|
|
84
|
+
npx learnhouse update --version 1.2.0
|
|
86
85
|
```
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
The update command pulls the new image, restarts services, and asks if you want to run database migrations. Check [docs.learnhouse.app](https://docs.learnhouse.app) for migration guides before proceeding.
|
|
89
88
|
|
|
90
|
-
|
|
89
|
+
## Generated Files
|
|
91
90
|
|
|
92
91
|
```
|
|
93
92
|
learnhouse/
|
|
94
|
-
docker-compose.yml
|
|
95
|
-
.env
|
|
96
|
-
learnhouse.config.json
|
|
93
|
+
docker-compose.yml # Service definitions
|
|
94
|
+
.env # Configuration
|
|
95
|
+
learnhouse.config.json # CLI metadata
|
|
97
96
|
extra/
|
|
98
|
-
nginx.prod.conf
|
|
97
|
+
nginx.prod.conf # Reverse proxy (or Caddyfile for auto-SSL)
|
|
99
98
|
```
|
|
100
99
|
|
|
101
100
|
## License
|
package/dist/bin/learnhouse.js
CHANGED
|
@@ -3616,7 +3616,7 @@ var {
|
|
|
3616
3616
|
var import_picocolors19 = __toESM(require_picocolors(), 1);
|
|
3617
3617
|
|
|
3618
3618
|
// src/constants.ts
|
|
3619
|
-
var VERSION = "1.3.
|
|
3619
|
+
var VERSION = "1.3.1";
|
|
3620
3620
|
var APP_IMAGE = "ghcr.io/learnhouse/app:latest";
|
|
3621
3621
|
var DEV_IMAGE = "ghcr.io/learnhouse/app:dev";
|
|
3622
3622
|
var POSTGRES_IMAGE = "postgres:16-alpine";
|
|
@@ -4832,14 +4832,6 @@ function isDockerInstalled() {
|
|
|
4832
4832
|
return false;
|
|
4833
4833
|
}
|
|
4834
4834
|
}
|
|
4835
|
-
function isDockerComposeV2() {
|
|
4836
|
-
try {
|
|
4837
|
-
const output = execSync("docker compose version", { stdio: "pipe" }).toString();
|
|
4838
|
-
return output.includes("v2");
|
|
4839
|
-
} catch {
|
|
4840
|
-
return false;
|
|
4841
|
-
}
|
|
4842
|
-
}
|
|
4843
4835
|
function isDockerRunning() {
|
|
4844
4836
|
try {
|
|
4845
4837
|
execSync("docker info", { stdio: "pipe" });
|
|
@@ -4993,11 +4985,6 @@ async function checkPrerequisites() {
|
|
|
4993
4985
|
check: isDockerInstalled,
|
|
4994
4986
|
failMsg: `Docker is not installed. Install it from ${import_picocolors6.default.underline("https://docs.docker.com/get-docker/")}`
|
|
4995
4987
|
},
|
|
4996
|
-
{
|
|
4997
|
-
name: "Docker Compose v2",
|
|
4998
|
-
check: isDockerComposeV2,
|
|
4999
|
-
failMsg: `Docker Compose v2 is required. Install it from ${import_picocolors6.default.underline("https://docs.docker.com/compose/install/")}`
|
|
5000
|
-
},
|
|
5001
4988
|
{
|
|
5002
4989
|
name: "Docker daemon",
|
|
5003
4990
|
check: isDockerRunning,
|
|
@@ -6934,11 +6921,6 @@ async function doctorCommand() {
|
|
|
6934
6921
|
process.exit(1);
|
|
6935
6922
|
}
|
|
6936
6923
|
pass("Docker daemon running");
|
|
6937
|
-
if (isDockerComposeV2()) {
|
|
6938
|
-
pass("Docker Compose v2 available");
|
|
6939
|
-
} else {
|
|
6940
|
-
fail("Docker Compose v2 not found", "Update Docker Desktop or install docker-compose-plugin");
|
|
6941
|
-
}
|
|
6942
6924
|
if (!config) {
|
|
6943
6925
|
R2.warn("No LearnHouse installation found. Skipping deployment checks.");
|
|
6944
6926
|
Le(import_picocolors14.default.dim("Done"));
|