wasm-cli 0.10.2__tar.gz
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.
- wasm_cli-0.10.2/LICENSE +21 -0
- wasm_cli-0.10.2/PKG-INFO +532 -0
- wasm_cli-0.10.2/README.md +487 -0
- wasm_cli-0.10.2/pyproject.toml +145 -0
- wasm_cli-0.10.2/setup.cfg +4 -0
- wasm_cli-0.10.2/setup.py +42 -0
- wasm_cli-0.10.2/src/wasm/__init__.py +20 -0
- wasm_cli-0.10.2/src/wasm/__main__.py +8 -0
- wasm_cli-0.10.2/src/wasm/cli/__init__.py +6 -0
- wasm_cli-0.10.2/src/wasm/cli/commands/__init__.py +9 -0
- wasm_cli-0.10.2/src/wasm/cli/commands/backup.py +480 -0
- wasm_cli-0.10.2/src/wasm/cli/commands/cert.py +237 -0
- wasm_cli-0.10.2/src/wasm/cli/commands/monitor.py +371 -0
- wasm_cli-0.10.2/src/wasm/cli/commands/service.py +203 -0
- wasm_cli-0.10.2/src/wasm/cli/commands/setup.py +1042 -0
- wasm_cli-0.10.2/src/wasm/cli/commands/site.py +231 -0
- wasm_cli-0.10.2/src/wasm/cli/commands/webapp.py +507 -0
- wasm_cli-0.10.2/src/wasm/cli/interactive.py +613 -0
- wasm_cli-0.10.2/src/wasm/cli/parser.py +995 -0
- wasm_cli-0.10.2/src/wasm/completions/__init__.py +31 -0
- wasm_cli-0.10.2/src/wasm/completions/_wasm +392 -0
- wasm_cli-0.10.2/src/wasm/completions/wasm.bash +445 -0
- wasm_cli-0.10.2/src/wasm/completions/wasm.fish +266 -0
- wasm_cli-0.10.2/src/wasm/core/__init__.py +7 -0
- wasm_cli-0.10.2/src/wasm/core/config.py +236 -0
- wasm_cli-0.10.2/src/wasm/core/dependencies.py +606 -0
- wasm_cli-0.10.2/src/wasm/core/exceptions.py +155 -0
- wasm_cli-0.10.2/src/wasm/core/logger.py +376 -0
- wasm_cli-0.10.2/src/wasm/core/utils.py +526 -0
- wasm_cli-0.10.2/src/wasm/deployers/__init__.py +11 -0
- wasm_cli-0.10.2/src/wasm/deployers/base.py +904 -0
- wasm_cli-0.10.2/src/wasm/deployers/nextjs.py +148 -0
- wasm_cli-0.10.2/src/wasm/deployers/nodejs.py +128 -0
- wasm_cli-0.10.2/src/wasm/deployers/python.py +221 -0
- wasm_cli-0.10.2/src/wasm/deployers/registry.py +143 -0
- wasm_cli-0.10.2/src/wasm/deployers/static.py +200 -0
- wasm_cli-0.10.2/src/wasm/deployers/vite.py +185 -0
- wasm_cli-0.10.2/src/wasm/main.py +112 -0
- wasm_cli-0.10.2/src/wasm/managers/__init__.py +21 -0
- wasm_cli-0.10.2/src/wasm/managers/apache_manager.py +363 -0
- wasm_cli-0.10.2/src/wasm/managers/backup_manager.py +964 -0
- wasm_cli-0.10.2/src/wasm/managers/base_manager.py +107 -0
- wasm_cli-0.10.2/src/wasm/managers/cert_manager.py +429 -0
- wasm_cli-0.10.2/src/wasm/managers/nginx_manager.py +334 -0
- wasm_cli-0.10.2/src/wasm/managers/service_manager.py +408 -0
- wasm_cli-0.10.2/src/wasm/managers/source_manager.py +450 -0
- wasm_cli-0.10.2/src/wasm/monitor/__init__.py +16 -0
- wasm_cli-0.10.2/src/wasm/monitor/ai_analyzer.py +575 -0
- wasm_cli-0.10.2/src/wasm/monitor/email_notifier.py +627 -0
- wasm_cli-0.10.2/src/wasm/monitor/process_monitor.py +836 -0
- wasm_cli-0.10.2/src/wasm/templates/__init__.py +1 -0
- wasm_cli-0.10.2/src/wasm/templates/apache/proxy.conf.j2 +56 -0
- wasm_cli-0.10.2/src/wasm/templates/apache/static.conf.j2 +68 -0
- wasm_cli-0.10.2/src/wasm/templates/nginx/proxy.conf.j2 +96 -0
- wasm_cli-0.10.2/src/wasm/templates/nginx/static.conf.j2 +80 -0
- wasm_cli-0.10.2/src/wasm/templates/systemd/app.service.j2 +40 -0
- wasm_cli-0.10.2/src/wasm/validators/__init__.py +32 -0
- wasm_cli-0.10.2/src/wasm/validators/domain.py +182 -0
- wasm_cli-0.10.2/src/wasm/validators/port.py +225 -0
- wasm_cli-0.10.2/src/wasm/validators/source.py +333 -0
- wasm_cli-0.10.2/src/wasm/validators/ssh.py +416 -0
- wasm_cli-0.10.2/src/wasm_cli.egg-info/PKG-INFO +532 -0
- wasm_cli-0.10.2/src/wasm_cli.egg-info/SOURCES.txt +72 -0
- wasm_cli-0.10.2/src/wasm_cli.egg-info/dependency_links.txt +1 -0
- wasm_cli-0.10.2/src/wasm_cli.egg-info/entry_points.txt +2 -0
- wasm_cli-0.10.2/src/wasm_cli.egg-info/requires.txt +18 -0
- wasm_cli-0.10.2/src/wasm_cli.egg-info/top_level.txt +1 -0
- wasm_cli-0.10.2/tests/test_backup.py +564 -0
- wasm_cli-0.10.2/tests/test_dependencies.py +209 -0
- wasm_cli-0.10.2/tests/test_logger.py +126 -0
- wasm_cli-0.10.2/tests/test_port.py +156 -0
- wasm_cli-0.10.2/tests/test_source.py +154 -0
- wasm_cli-0.10.2/tests/test_ssh.py +84 -0
- wasm_cli-0.10.2/tests/test_validators.py +124 -0
wasm_cli-0.10.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 WASM Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
wasm_cli-0.10.2/PKG-INFO
ADDED
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wasm-cli
|
|
3
|
+
Version: 0.10.2
|
|
4
|
+
Summary: Web App System Management - Deploy and manage web applications on Linux servers
|
|
5
|
+
Author: WASM Team
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/your-org/wasm
|
|
8
|
+
Project-URL: Documentation, https://github.com/your-org/wasm#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/your-org/wasm.git
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/your-org/wasm/issues
|
|
11
|
+
Keywords: cli,deployment,nginx,apache,systemd,web-apps,server-management,certbot,ssl
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: System Administrators
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: System :: Installation/Setup
|
|
23
|
+
Classifier: Topic :: System :: Systems Administration
|
|
24
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: inquirer>=3.1.0
|
|
29
|
+
Requires-Dist: Jinja2>=3.1.0
|
|
30
|
+
Requires-Dist: PyYAML>=6.0
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
33
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
34
|
+
Requires-Dist: black>=23.0; extra == "dev"
|
|
35
|
+
Requires-Dist: isort>=5.12; extra == "dev"
|
|
36
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
37
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
38
|
+
Provides-Extra: rich
|
|
39
|
+
Requires-Dist: rich>=13.0; extra == "rich"
|
|
40
|
+
Provides-Extra: monitor
|
|
41
|
+
Requires-Dist: psutil>=5.9.0; extra == "monitor"
|
|
42
|
+
Requires-Dist: httpx>=0.25.0; extra == "monitor"
|
|
43
|
+
Dynamic: license-file
|
|
44
|
+
Dynamic: requires-python
|
|
45
|
+
|
|
46
|
+
# WASM - Web App System Management
|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<img src="docs/assets/logo.png" alt="WASM Logo" width="200">
|
|
50
|
+
</p>
|
|
51
|
+
|
|
52
|
+
<p align="center">
|
|
53
|
+
<strong>Deploy, manage, and monitor web applications with ease</strong>
|
|
54
|
+
</p>
|
|
55
|
+
|
|
56
|
+
<p align="center">
|
|
57
|
+
<a href="#installation">Installation</a> •
|
|
58
|
+
<a href="#quick-start">Quick Start</a> •
|
|
59
|
+
<a href="#features">Features</a> •
|
|
60
|
+
<a href="#documentation">Documentation</a>
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 🚀 What is WASM?
|
|
66
|
+
|
|
67
|
+
**WASM (Web App System Management)** is a powerful CLI tool designed to simplify the deployment and management of web applications on Linux servers. It automates the entire process from cloning your code to serving it with Nginx/Apache, including SSL certificates and systemd services.
|
|
68
|
+
|
|
69
|
+
### Key Capabilities
|
|
70
|
+
|
|
71
|
+
- 🌐 **Site Management** - Create and manage Nginx/Apache virtual hosts
|
|
72
|
+
- 🔒 **SSL Certificates** - Automated Let's Encrypt certificates via Certbot
|
|
73
|
+
- ⚙️ **Service Management** - Create and control systemd services
|
|
74
|
+
- 🚀 **One-Command Deployment** - Deploy full-stack applications instantly
|
|
75
|
+
- 🎯 **Multi-Framework Support** - Next.js, Node.js, Vite, Python, and more
|
|
76
|
+
- 🧭 **Interactive Mode** - Guided step-by-step deployment wizard
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 📦 Installation
|
|
81
|
+
|
|
82
|
+
### Ubuntu/Debian - From PPA (Recommended)
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
sudo add-apt-repository ppa:yago2003/wasm
|
|
86
|
+
sudo apt update
|
|
87
|
+
sudo apt install wasm
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Supported Ubuntu versions:
|
|
91
|
+
- Ubuntu 24.04 LTS (Noble Numbat)
|
|
92
|
+
- Ubuntu 24.10 (Plucky Puffin)
|
|
93
|
+
- Ubuntu 25.04 (Questing Qetzal)
|
|
94
|
+
|
|
95
|
+
### Fedora - From OBS Repository
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Add repository
|
|
99
|
+
sudo dnf config-manager --add-repo \
|
|
100
|
+
https://download.opensuse.org/repositories/home:/Perkybeet/Fedora_40/home:Perkybeet.repo
|
|
101
|
+
|
|
102
|
+
# Install
|
|
103
|
+
sudo dnf install wasm-cli
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### openSUSE - From OBS Repository
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Tumbleweed
|
|
110
|
+
sudo zypper ar -f \
|
|
111
|
+
https://download.opensuse.org/repositories/home:/Perkybeet/openSUSE_Tumbleweed/ \
|
|
112
|
+
home_Perkybeet
|
|
113
|
+
sudo zypper install wasm-cli
|
|
114
|
+
|
|
115
|
+
# Leap 15.6
|
|
116
|
+
sudo zypper ar -f \
|
|
117
|
+
https://download.opensuse.org/repositories/home:/Perkybeet/openSUSE_Leap_15.6/ \
|
|
118
|
+
home_Perkybeet
|
|
119
|
+
sudo zypper install wasm-cli
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Debian - From OBS Repository
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Add repository key
|
|
126
|
+
curl -fsSL https://download.opensuse.org/repositories/home:/Perkybeet/Debian_12/Release.key | \
|
|
127
|
+
gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_Perkybeet.gpg > /dev/null
|
|
128
|
+
|
|
129
|
+
# Add repository
|
|
130
|
+
echo 'deb https://download.opensuse.org/repositories/home:/Perkybeet/Debian_12/ /' | \
|
|
131
|
+
sudo tee /etc/apt/sources.list.d/home_Perkybeet.list
|
|
132
|
+
|
|
133
|
+
# Install
|
|
134
|
+
sudo apt update
|
|
135
|
+
sudo apt install wasm-cli
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### From .deb Package
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
wget https://github.com/Perkybeet/wasm/releases/latest/download/wasm_0.8.2_all.deb
|
|
142
|
+
sudo dpkg -i wasm_0.8.2_all.deb
|
|
143
|
+
sudo apt install -f # Install dependencies if needed
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### From PyPI
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
pip install wasm-cli
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### From Source
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
git clone https://github.com/your-org/wasm.git
|
|
156
|
+
cd wasm
|
|
157
|
+
pip install -e .
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 🏃 Quick Start
|
|
163
|
+
|
|
164
|
+
### Deploy a Next.js Application
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# One-liner deployment
|
|
168
|
+
wasm webapp create \
|
|
169
|
+
--domain myapp.example.com \
|
|
170
|
+
--source git@github.com:user/my-nextjs-app.git \
|
|
171
|
+
--type nextjs \
|
|
172
|
+
--port 3000
|
|
173
|
+
|
|
174
|
+
# Short version
|
|
175
|
+
wasm wp create -d myapp.example.com -s git@github.com:user/app.git -t nextjs -p 3000
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Interactive Mode
|
|
179
|
+
|
|
180
|
+
For a guided experience, simply run:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
wasm
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Or explicitly:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
wasm --interactive
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
You'll be guided through all the options step by step:
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
┌─────────────────────────────────────────────────┐
|
|
196
|
+
│ WASM - Web App System Management │
|
|
197
|
+
└─────────────────────────────────────────────────┘
|
|
198
|
+
|
|
199
|
+
? What would you like to do?
|
|
200
|
+
❯ 🚀 Deploy a Web Application
|
|
201
|
+
🌐 Manage Sites (Nginx/Apache)
|
|
202
|
+
⚙️ Manage Services
|
|
203
|
+
🔒 Manage SSL Certificates
|
|
204
|
+
📊 View Status Dashboard
|
|
205
|
+
⚡ Exit
|
|
206
|
+
|
|
207
|
+
? Select application type:
|
|
208
|
+
❯ Next.js
|
|
209
|
+
Node.js (Express, Fastify, etc.)
|
|
210
|
+
Vite (React, Vue, Svelte)
|
|
211
|
+
Python (Django, Flask, FastAPI)
|
|
212
|
+
Static Site
|
|
213
|
+
Custom
|
|
214
|
+
|
|
215
|
+
? Enter the domain name: myapp.example.com
|
|
216
|
+
? Enter the source (Git URL or path): git@github.com:user/app.git
|
|
217
|
+
? Enter the port number: 3000
|
|
218
|
+
? Configure SSL certificate? Yes
|
|
219
|
+
|
|
220
|
+
[1/7] 📥 Cloning repository...
|
|
221
|
+
[2/7] 📦 Installing dependencies...
|
|
222
|
+
[3/7] 🔨 Building application...
|
|
223
|
+
[4/7] 🌐 Creating Nginx configuration...
|
|
224
|
+
[5/7] 🔒 Obtaining SSL certificate...
|
|
225
|
+
[6/7] ⚙️ Creating systemd service...
|
|
226
|
+
[7/7] 🚀 Starting application...
|
|
227
|
+
|
|
228
|
+
✅ Deployment complete!
|
|
229
|
+
|
|
230
|
+
URL: https://myapp.example.com
|
|
231
|
+
Status: Running
|
|
232
|
+
Service: wasm-myapp-example-com
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## 📋 Features
|
|
238
|
+
|
|
239
|
+
### Web Application Deployment
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# Create a new web application
|
|
243
|
+
wasm webapp create [options]
|
|
244
|
+
|
|
245
|
+
Options:
|
|
246
|
+
-d, --domain DOMAIN Target domain (e.g., example.com)
|
|
247
|
+
-s, --source SOURCE Git URL or local path to source code
|
|
248
|
+
-t, --type TYPE Application type (nextjs, nodejs, vite, python, static)
|
|
249
|
+
-p, --port PORT Application port (default: auto-assigned)
|
|
250
|
+
-w, --webserver SERVER Web server (nginx, apache) [default: nginx]
|
|
251
|
+
--no-ssl Skip SSL certificate configuration
|
|
252
|
+
--branch BRANCH Git branch to deploy [default: main]
|
|
253
|
+
--env-file FILE Path to .env file to use
|
|
254
|
+
-v, --verbose Enable verbose output
|
|
255
|
+
|
|
256
|
+
# List deployed applications
|
|
257
|
+
wasm webapp list
|
|
258
|
+
|
|
259
|
+
# Get application status
|
|
260
|
+
wasm webapp status myapp.example.com
|
|
261
|
+
|
|
262
|
+
# Restart application
|
|
263
|
+
wasm webapp restart myapp.example.com
|
|
264
|
+
|
|
265
|
+
# Remove application
|
|
266
|
+
wasm webapp delete myapp.example.com
|
|
267
|
+
|
|
268
|
+
# Update application (pull & rebuild)
|
|
269
|
+
wasm webapp update myapp.example.com
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Site Management
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
# Create a site (without deploying an app)
|
|
276
|
+
wasm site create -d example.com -w nginx
|
|
277
|
+
|
|
278
|
+
# List all sites
|
|
279
|
+
wasm site list
|
|
280
|
+
|
|
281
|
+
# Enable/disable site
|
|
282
|
+
wasm site enable example.com
|
|
283
|
+
wasm site disable example.com
|
|
284
|
+
|
|
285
|
+
# Delete site
|
|
286
|
+
wasm site delete example.com
|
|
287
|
+
|
|
288
|
+
# Show site configuration
|
|
289
|
+
wasm site show example.com
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Service Management
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# Create a custom service
|
|
296
|
+
wasm service create --name myservice --command "/usr/bin/myapp" --user www-data
|
|
297
|
+
|
|
298
|
+
# List managed services
|
|
299
|
+
wasm service list
|
|
300
|
+
|
|
301
|
+
# Control services
|
|
302
|
+
wasm service start myservice
|
|
303
|
+
wasm service stop myservice
|
|
304
|
+
wasm service restart myservice
|
|
305
|
+
|
|
306
|
+
# View service status
|
|
307
|
+
wasm service status myservice
|
|
308
|
+
|
|
309
|
+
# View service logs
|
|
310
|
+
wasm service logs myservice
|
|
311
|
+
wasm service logs myservice --follow
|
|
312
|
+
wasm service logs myservice --lines 100
|
|
313
|
+
|
|
314
|
+
# Delete service
|
|
315
|
+
wasm service delete myservice
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### SSL Certificate Management
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
# Obtain certificate for a domain
|
|
322
|
+
wasm cert create -d example.com
|
|
323
|
+
|
|
324
|
+
# List certificates
|
|
325
|
+
wasm cert list
|
|
326
|
+
|
|
327
|
+
# Renew all certificates
|
|
328
|
+
wasm cert renew
|
|
329
|
+
|
|
330
|
+
# Revoke a certificate
|
|
331
|
+
wasm cert revoke example.com
|
|
332
|
+
|
|
333
|
+
# Show certificate info
|
|
334
|
+
wasm cert info example.com
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## 🎯 Supported Application Types
|
|
340
|
+
|
|
341
|
+
| Type | Framework | Auto-Detection |
|
|
342
|
+
|------|-----------|----------------|
|
|
343
|
+
| `nextjs` | Next.js | `next.config.js` |
|
|
344
|
+
| `nodejs` | Express, Fastify, Koa, etc. | `package.json` with start script |
|
|
345
|
+
| `vite` | React, Vue, Svelte (Vite) | `vite.config.js` |
|
|
346
|
+
| `python` | Django, Flask, FastAPI | `requirements.txt`, `pyproject.toml` |
|
|
347
|
+
| `static` | HTML/CSS/JS | `index.html` |
|
|
348
|
+
|
|
349
|
+
Each type has a specific deployment workflow that includes:
|
|
350
|
+
- Dependency installation
|
|
351
|
+
- Build process
|
|
352
|
+
- Environment configuration
|
|
353
|
+
- Service setup
|
|
354
|
+
- Health checks
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
## ⚙️ Configuration
|
|
359
|
+
|
|
360
|
+
### Global Configuration
|
|
361
|
+
|
|
362
|
+
Configuration file location: `/etc/wasm/config.yaml`
|
|
363
|
+
|
|
364
|
+
```yaml
|
|
365
|
+
# Default web server
|
|
366
|
+
webserver: nginx
|
|
367
|
+
|
|
368
|
+
# Default apps directory
|
|
369
|
+
apps_directory: /var/www/apps
|
|
370
|
+
|
|
371
|
+
# Default user for services
|
|
372
|
+
service_user: www-data
|
|
373
|
+
|
|
374
|
+
# SSL settings
|
|
375
|
+
ssl:
|
|
376
|
+
enabled: true
|
|
377
|
+
provider: certbot
|
|
378
|
+
email: admin@example.com
|
|
379
|
+
|
|
380
|
+
# Logging
|
|
381
|
+
logging:
|
|
382
|
+
level: info
|
|
383
|
+
file: /var/log/wasm/wasm.log
|
|
384
|
+
|
|
385
|
+
# Node.js settings
|
|
386
|
+
nodejs:
|
|
387
|
+
default_version: 20
|
|
388
|
+
use_nvm: false
|
|
389
|
+
|
|
390
|
+
# Python settings
|
|
391
|
+
python:
|
|
392
|
+
default_version: "3.11"
|
|
393
|
+
use_venv: true
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### Per-Project Configuration
|
|
397
|
+
|
|
398
|
+
You can include a `.wasm.yaml` file in your project root:
|
|
399
|
+
|
|
400
|
+
```yaml
|
|
401
|
+
type: nextjs
|
|
402
|
+
port: 3000
|
|
403
|
+
build_command: npm run build
|
|
404
|
+
start_command: npm run start
|
|
405
|
+
env_vars:
|
|
406
|
+
NODE_ENV: production
|
|
407
|
+
health_check:
|
|
408
|
+
path: /api/health
|
|
409
|
+
timeout: 30
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## 📊 Verbose Mode
|
|
415
|
+
|
|
416
|
+
Add `--verbose` or `-v` for detailed output:
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
wasm webapp create -d example.com -s git@github.com:user/app.git -t nextjs -v
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
**Verbose output example:**
|
|
423
|
+
|
|
424
|
+
```
|
|
425
|
+
[1/7] 📥 Cloning repository...
|
|
426
|
+
├─ Source: git@github.com:user/app.git
|
|
427
|
+
├─ Branch: main
|
|
428
|
+
├─ Target: /var/www/apps/example-com
|
|
429
|
+
└─ Completed in 4.2s
|
|
430
|
+
|
|
431
|
+
[2/7] 📦 Installing dependencies...
|
|
432
|
+
├─ Package manager: npm
|
|
433
|
+
├─ Command: npm ci --production=false
|
|
434
|
+
├─ Packages installed: 1,247
|
|
435
|
+
└─ Completed in 45.3s
|
|
436
|
+
|
|
437
|
+
[3/7] 🔨 Building application...
|
|
438
|
+
├─ Command: npm run build
|
|
439
|
+
├─ Output directory: .next
|
|
440
|
+
├─ Build size: 12.4 MB
|
|
441
|
+
└─ Completed in 32.1s
|
|
442
|
+
...
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## 🗂️ Directory Structure
|
|
448
|
+
|
|
449
|
+
WASM organizes deployed applications as follows:
|
|
450
|
+
|
|
451
|
+
```
|
|
452
|
+
/var/www/apps/
|
|
453
|
+
├── example-com/
|
|
454
|
+
│ ├── current/ # Current deployment (symlink)
|
|
455
|
+
│ ├── releases/ # Previous releases (for rollback)
|
|
456
|
+
│ │ ├── 20241215120000/
|
|
457
|
+
│ │ └── 20241214150000/
|
|
458
|
+
│ ├── shared/ # Shared files (uploads, logs)
|
|
459
|
+
│ └── .env # Environment variables
|
|
460
|
+
│
|
|
461
|
+
└── another-app/
|
|
462
|
+
└── ...
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
## 🔧 Requirements
|
|
468
|
+
|
|
469
|
+
### System Requirements
|
|
470
|
+
|
|
471
|
+
- **OS:** Ubuntu 20.04+, Debian 11+
|
|
472
|
+
- **Python:** 3.10+
|
|
473
|
+
- **Privileges:** sudo access for service management
|
|
474
|
+
|
|
475
|
+
### Optional Dependencies
|
|
476
|
+
|
|
477
|
+
- **nginx** or **apache2** - Web server
|
|
478
|
+
- **certbot** - SSL certificates
|
|
479
|
+
- **git** - Source code management
|
|
480
|
+
- **nodejs** / **nvm** - For Node.js applications
|
|
481
|
+
- **python3-venv** - For Python applications
|
|
482
|
+
|
|
483
|
+
WASM will check and prompt for missing dependencies during installation.
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
## 🤝 Contributing
|
|
488
|
+
|
|
489
|
+
We welcome contributions! Please see our [Contributing Guide](.github/CONTRIBUTING.md) for details.
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
# Development setup
|
|
493
|
+
git clone https://github.com/Perkybeet/wasm.git
|
|
494
|
+
cd wasm
|
|
495
|
+
python -m venv venv
|
|
496
|
+
source venv/bin/activate
|
|
497
|
+
pip install -e ".[dev]"
|
|
498
|
+
|
|
499
|
+
# Run tests
|
|
500
|
+
pytest
|
|
501
|
+
|
|
502
|
+
# Build .deb package
|
|
503
|
+
make debian
|
|
504
|
+
|
|
505
|
+
# Build and upload to PPA (all distributions)
|
|
506
|
+
make ppa-upload
|
|
507
|
+
|
|
508
|
+
# Or for specific distributions
|
|
509
|
+
./build-and-upload-ppa.sh noble plucky
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
For detailed information about building and uploading to PPA, see [docs/PPA_UPLOAD.md](docs/PPA_UPLOAD.md).
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
## 📜 License
|
|
517
|
+
|
|
518
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
519
|
+
|
|
520
|
+
---
|
|
521
|
+
|
|
522
|
+
## 🙏 Acknowledgments
|
|
523
|
+
|
|
524
|
+
- [Certbot](https://certbot.eff.org/) for SSL automation
|
|
525
|
+
- [python-inquirer](https://github.com/magmax/python-inquirer) for interactive CLI
|
|
526
|
+
- The open-source community
|
|
527
|
+
|
|
528
|
+
---
|
|
529
|
+
|
|
530
|
+
<p align="center">
|
|
531
|
+
Made with ❤️ for the DevOps community
|
|
532
|
+
</p>
|