@flying-pillow/manager 0.1.0-beta.10
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 +132 -0
- package/dist/assets/application/docker/docker-compose.gpu.yml +16 -0
- package/dist/assets/application/docker/docker-compose.yml +579 -0
- package/dist/assets/application/migrations/0.0.0/entity_model.json +12589 -0
- package/dist/assets/application/migrations/0.1.0-beta.0/entity_model.json +12589 -0
- package/dist/assets/application/migrations/0.1.0-beta.1/entity_model.json +12589 -0
- package/dist/assets/application/migrations/0.1.0-beta.2/entity_model.json +18600 -0
- package/dist/assets/application/migrations/0.1.0-beta.5/entity_model.json +18600 -0
- package/dist/assets/application/migrations/0.1.0-beta.8/entity_model.json +18600 -0
- package/dist/assets/application/migrations/0.1.0-beta.9/entity_model.json +18600 -0
- package/dist/assets/application/observability/README.md +130 -0
- package/dist/assets/application/observability/grafana/provisioning/dashboards/celery_dashboard.json +1045 -0
- package/dist/assets/application/observability/grafana/provisioning/dashboards/dashboard.yml +13 -0
- package/dist/assets/application/observability/grafana/provisioning/datasources/datasources.yml +23 -0
- package/dist/assets/application/observability/otel-collector/otel-collector-config.yml +77 -0
- package/dist/assets/application/observability/prometheus/prometheus.yml +19 -0
- package/dist/assets/application/observability/surrealist/instance.json +24 -0
- package/dist/assets/gateway/docker/docker-compose.gateway.yml +127 -0
- package/dist/assets/gateway/terminal/Dockerfile +19 -0
- package/dist/assets/gateway/terminal/entrypoint.sh +28 -0
- package/dist/cli.js +36858 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Flying Pillow CLI
|
|
2
|
+
|
|
3
|
+
The official command-line interface for installing, configuring, and managing the **Flying Pillow** platform.
|
|
4
|
+
|
|
5
|
+
This tool streamlines the deployment of the Flying Pillow monorepo, handling source code retrieval, environment configuration, SSL certificates, and Docker orchestration across Development, Staging, and Production environments.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
## 🚀 Quick Start (Installation)
|
|
11
|
+
|
|
12
|
+
To install the Flying Pillow platform on a new server or local machine, you do not need to clone the repository manually. The CLI handles everything.
|
|
13
|
+
|
|
14
|
+
**Run the installer via `npx`:**
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Install the latest beta version
|
|
18
|
+
npx @flying-pillow/cli@beta install
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**What this does:**
|
|
22
|
+
|
|
23
|
+
1. Downloads the correct source code version from GitHub.
|
|
24
|
+
2. Extracts it to your specified directory.
|
|
25
|
+
3. Launches an interactive configuration wizard to set up:
|
|
26
|
+
- Domain names and SSL (Let's Encrypt or Local).
|
|
27
|
+
- System credentials.
|
|
28
|
+
- Docker networking and environment variables.
|
|
29
|
+
4. Starts your selected services.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 🛠Management (Day-2 Operations)
|
|
34
|
+
|
|
35
|
+
Once installed, you use the CLI to manage the lifecycle of your environments.
|
|
36
|
+
|
|
37
|
+
### Option A: Global Installation (Recommended)
|
|
38
|
+
|
|
39
|
+
For the best experience, install the CLI globally so the `fp` command is available anywhere.
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm install -g @flying-pillow/cli@beta
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Option B: Run via NPX
|
|
46
|
+
|
|
47
|
+
If you prefer not to install globally, you can execute commands inside your installation directory using `npx`:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cd /path/to/flying-pillow
|
|
51
|
+
npx @flying-pillow/cli@beta <command>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 📖 Command Reference
|
|
57
|
+
|
|
58
|
+
### `fp install [gateway]`
|
|
59
|
+
|
|
60
|
+
Runs the full installation wizard.
|
|
61
|
+
|
|
62
|
+
- `fp install`: Installs the full stack (Gateway + App Environments).
|
|
63
|
+
- `fp install gateway`: Configures only the Gateway (Traefik, DNS, TLS) service.
|
|
64
|
+
|
|
65
|
+
### `fp up <target>`
|
|
66
|
+
|
|
67
|
+
Starts the services for a specific environment. Handles Docker networking and volume mounts automatically.
|
|
68
|
+
|
|
69
|
+
- **Targets:** `gateway`, `dev`, `staging`, `prod`
|
|
70
|
+
- **Example:** `fp up prod`
|
|
71
|
+
|
|
72
|
+
### `fp down <target>`
|
|
73
|
+
|
|
74
|
+
Stops and removes the containers for a specific environment.
|
|
75
|
+
|
|
76
|
+
- **Example:** `fp down staging`
|
|
77
|
+
|
|
78
|
+
### `fp rebuild <target> [services...]`
|
|
79
|
+
|
|
80
|
+
Forces a rebuild of Docker images for specific services. Useful after updating code or configuration.
|
|
81
|
+
|
|
82
|
+
- **Example:** `fp rebuild prod app wss` (Rebuilds only the App and Websocket services in Production)
|
|
83
|
+
|
|
84
|
+
### `fp logs <target> [service]`
|
|
85
|
+
|
|
86
|
+
Tails the logs for an environment or a specific service.
|
|
87
|
+
|
|
88
|
+
- **Example:** `fp logs gateway` (View Traefik logs)
|
|
89
|
+
- **Example:** `fp logs prod app` (View logs for the main application container)
|
|
90
|
+
|
|
91
|
+
### `fp backup <target>`
|
|
92
|
+
|
|
93
|
+
Performs a full backup of the SurrealDB database (Global + all Tenants) for the specified environment.
|
|
94
|
+
|
|
95
|
+
- **Targets:** `dev`, `staging`, `prod`
|
|
96
|
+
- **Example:** `fp backup prod`
|
|
97
|
+
- **Configuration:**
|
|
98
|
+
- Uses `CONFIG_PATH` from your `.env` file by default.
|
|
99
|
+
- Can be overridden by setting `BACKUP_FOLDER` in your `.env` file.
|
|
100
|
+
- The CLI will interactively confirm the backup location before proceeding.
|
|
101
|
+
- **Output:** Backups are stored in `<backup-folder>/backups/<timestamp>/`.
|
|
102
|
+
- Includes `.surql` exports for Global and all Tenant databases.
|
|
103
|
+
- Includes a copy of the raw data folders for each tenant (with ownership preserved).
|
|
104
|
+
- Includes `backup_info.json` with metadata (date, system version, tenant list).
|
|
105
|
+
|
|
106
|
+
### `fp upgrade`
|
|
107
|
+
|
|
108
|
+
Automates the upgrade process by fetching the latest source code while preserving your existing `.env` configurations and data volumes.
|
|
109
|
+
**Note:** This command automatically performs a full system backup before applying any changes.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 📋 Prerequisites
|
|
114
|
+
|
|
115
|
+
Before running the CLI, ensure your system meets these requirements:
|
|
116
|
+
|
|
117
|
+
- **OS:** Linux (Ubuntu/Debian recommended) or macOS.
|
|
118
|
+
- **Node.js:** Version 22 or higher.
|
|
119
|
+
- **Docker:** Engine 24+ with Docker Compose Plugin (`docker compose`).
|
|
120
|
+
- **Permissions:** User must be in the `docker` group (Linux) to run containers without sudo.
|
|
121
|
+
|
|
122
|
+
## 🔒 Security & Ports
|
|
123
|
+
|
|
124
|
+
The CLI configures a secure Gateway (Traefik) to route traffic. Ensure the following ports are open on your host:
|
|
125
|
+
|
|
126
|
+
- **80 / 443:** HTTP/HTTPS traffic (handled by Gateway).
|
|
127
|
+
- **8080:** SurrealDB (if running in Dev mode).
|
|
128
|
+
- **Other:** Specific services may expose internal ports in Dev mode (e.g., `5678` for debugging).
|
|
129
|
+
|
|
130
|
+
## 📄 License
|
|
131
|
+
|
|
132
|
+
This CLI is distributed under the ISC License.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# ----------------------------------------------------------------
|
|
2
|
+
# DOCKER COMPOSE OVERLAY FOR FLYING PILLOW GPU SUPPORT
|
|
3
|
+
# ----------------------------------------------------------------
|
|
4
|
+
services:
|
|
5
|
+
# If you want GPU for Ollama on Linux with NVIDIA:
|
|
6
|
+
ollama:
|
|
7
|
+
deploy:
|
|
8
|
+
resources:
|
|
9
|
+
reservations:
|
|
10
|
+
devices:
|
|
11
|
+
- driver: nvidia
|
|
12
|
+
count: all
|
|
13
|
+
capabilities: [ gpu ]
|
|
14
|
+
environment:
|
|
15
|
+
- NVIDIA_VISIBLE_DEVICES=all
|
|
16
|
+
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
|