wasm-cli 0.15.4__tar.gz → 0.15.6__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.15.4/src/wasm_cli.egg-info → wasm_cli-0.15.6}/PKG-INFO +1 -1
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/pyproject.toml +1 -1
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/setup.py +1 -1
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/__init__.py +1 -1
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/site.py +68 -6
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/interactive.py +24 -3
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/parser.py +11 -1
- {wasm_cli-0.15.4 → wasm_cli-0.15.6/src/wasm_cli.egg-info}/PKG-INFO +1 -1
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/LICENSE +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/MANIFEST.in +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/README.md +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/docs/MONITOR.md +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/docs/OBS_SETUP.md +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/docs/assets/logo.png +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/docs/assets/logo_bg.png +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/man/wasm.1 +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/setup.cfg +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/__main__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/backup.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/cert.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/config.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/db.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/env.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/health.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/monitor.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/service.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/setup.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/store.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/version.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/web.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/webapp.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/completions/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/completions/_wasm +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/completions/wasm.bash +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/completions/wasm.fish +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/config.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/dependencies.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/exceptions.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/logger.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/store.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/update_checker.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/utils.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/base.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/docker_compose.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/env_manager.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/nginx_config.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/package_manager.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/path_resolver.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/prisma.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/turbo.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/workspace.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/monorepo.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/nextjs.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/nodejs.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/python.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/registry.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/static.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/vite.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/main.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/apache_manager.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/backup_manager.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/backup_scheduler.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/base_manager.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/cert_manager.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/base.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/mongodb.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/mysql.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/postgres.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/redis.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/registry.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/nginx_manager.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/service_manager.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/source_manager.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/monitor/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/monitor/ai_analyzer.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/monitor/email_notifier.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/monitor/process_monitor.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/monitor/threat_store.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/apache/proxy.conf.j2 +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/apache/static.conf.j2 +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/nginx/advanced.conf.j2 +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/nginx/monorepo.conf.j2 +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/nginx/proxy.conf.j2 +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/nginx/static.conf.j2 +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/systemd/app.service.j2 +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/systemd/backup-service.j2 +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/systemd/backup-timer.j2 +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/systemd/docker-compose.service.j2 +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/validators/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/validators/domain.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/validators/port.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/validators/source.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/validators/ssh.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/apps.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/auth.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/backups.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/certs.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/config.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/databases.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/jobs.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/monitor.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/router.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/services.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/sites.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/system.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/auth.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/jobs.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/server.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/css/main.css +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/index.html +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/components/cards.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/components/jobs.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/components/metrics.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/components/skeleton.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/api.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/dialogs.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/notifications.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/router.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/search.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/shortcuts.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/theme.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/ui.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/websocket.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/main.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/apps.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/backups.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/certs.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/config.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/dashboard.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/databases.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/jobs.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/logs.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/monitor.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/services.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/sites.js +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/login.html +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/logo.png +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/logo.webp +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/websockets/__init__.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/websockets/router.py +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm_cli.egg-info/SOURCES.txt +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm_cli.egg-info/dependency_links.txt +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm_cli.egg-info/entry_points.txt +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm_cli.egg-info/requires.txt +0 -0
- {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm_cli.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "wasm-cli"
|
|
7
|
-
version = "0.15.
|
|
7
|
+
version = "0.15.6"
|
|
8
8
|
description = "Web App System Management - Deploy and manage web applications on Linux servers"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "WASM-NCSAL" }
|
|
@@ -9,7 +9,7 @@ from setuptools import setup, find_packages
|
|
|
9
9
|
|
|
10
10
|
setup(
|
|
11
11
|
name="wasm-cli",
|
|
12
|
-
version="0.15.
|
|
12
|
+
version="0.15.6",
|
|
13
13
|
description="Web App System Management - Deploy and manage web applications on Linux servers",
|
|
14
14
|
author="Yago López Prado",
|
|
15
15
|
author_email="yago.lopez.adeje@gmail.com",
|
|
@@ -67,21 +67,83 @@ def _get_manager(webserver: str, verbose: bool = False):
|
|
|
67
67
|
def _handle_create(args: Namespace) -> int:
|
|
68
68
|
"""Handle site create command."""
|
|
69
69
|
logger = Logger(verbose=args.verbose)
|
|
70
|
-
|
|
70
|
+
|
|
71
|
+
from wasm.validators.domain import should_include_www
|
|
72
|
+
from wasm.managers.cert_manager import CertManager
|
|
73
|
+
|
|
71
74
|
domain = validate_domain(args.domain)
|
|
72
75
|
manager = _get_manager(args.webserver, verbose=args.verbose)
|
|
73
|
-
|
|
76
|
+
no_ssl = getattr(args, "no_ssl", False)
|
|
77
|
+
include_www = getattr(args, "www", False) and should_include_www(domain)
|
|
78
|
+
|
|
79
|
+
server_names = domain
|
|
80
|
+
if include_www:
|
|
81
|
+
server_names = f"{domain} www.{domain}"
|
|
82
|
+
logger.info(f"Including www.{domain}")
|
|
83
|
+
|
|
84
|
+
# Step 1: Create site without SSL (needed for certbot webroot validation)
|
|
74
85
|
context = {
|
|
75
86
|
"port": args.port,
|
|
76
|
-
"ssl": False,
|
|
87
|
+
"ssl": False,
|
|
88
|
+
"server_names": server_names,
|
|
77
89
|
}
|
|
78
|
-
|
|
90
|
+
|
|
79
91
|
logger.info(f"Creating site: {domain}")
|
|
80
92
|
manager.create_site(domain, template=args.template, context=context)
|
|
81
93
|
manager.enable_site(domain)
|
|
82
94
|
manager.reload()
|
|
83
|
-
|
|
84
|
-
|
|
95
|
+
|
|
96
|
+
# Step 2: Obtain SSL certificate if requested
|
|
97
|
+
ssl_obtained = False
|
|
98
|
+
if not no_ssl:
|
|
99
|
+
cert_manager = CertManager(verbose=args.verbose)
|
|
100
|
+
if cert_manager.is_installed():
|
|
101
|
+
# Check if a valid certificate already exists
|
|
102
|
+
if cert_manager.cert_exists(domain):
|
|
103
|
+
test = cert_manager.test_cert(domain)
|
|
104
|
+
if test.get("valid"):
|
|
105
|
+
logger.info(f"Valid SSL certificate found for {domain}")
|
|
106
|
+
ssl_obtained = True
|
|
107
|
+
else:
|
|
108
|
+
logger.warning(f"Existing certificate invalid, obtaining new one...")
|
|
109
|
+
|
|
110
|
+
if not ssl_obtained:
|
|
111
|
+
logger.info(f"Obtaining SSL certificate for {domain}...")
|
|
112
|
+
try:
|
|
113
|
+
additional_domains = None
|
|
114
|
+
if include_www:
|
|
115
|
+
additional_domains = [f"www.{domain}"]
|
|
116
|
+
|
|
117
|
+
nginx = args.webserver == "nginx"
|
|
118
|
+
apache = args.webserver == "apache"
|
|
119
|
+
|
|
120
|
+
cert_manager.obtain(
|
|
121
|
+
domain,
|
|
122
|
+
nginx=nginx,
|
|
123
|
+
apache=apache,
|
|
124
|
+
additional_domains=additional_domains,
|
|
125
|
+
)
|
|
126
|
+
ssl_obtained = True
|
|
127
|
+
except WASMError as e:
|
|
128
|
+
logger.warning(f"SSL certificate failed: {e}")
|
|
129
|
+
logger.info("Site created without SSL. You can add it later with: wasm cert create")
|
|
130
|
+
else:
|
|
131
|
+
logger.warning("Certbot not installed, skipping SSL")
|
|
132
|
+
logger.info("Install with: sudo apt install certbot")
|
|
133
|
+
|
|
134
|
+
# Step 3: Recreate site config with SSL if certificate was obtained
|
|
135
|
+
if ssl_obtained:
|
|
136
|
+
cert_paths = cert_manager.get_cert_path(domain)
|
|
137
|
+
context["ssl"] = True
|
|
138
|
+
context["ssl_certificate"] = str(cert_paths["fullchain"])
|
|
139
|
+
context["ssl_certificate_key"] = str(cert_paths["privkey"])
|
|
140
|
+
|
|
141
|
+
manager.create_site(domain, template=args.template, context=context)
|
|
142
|
+
manager.reload()
|
|
143
|
+
logger.success(f"Site created with SSL: {domain}")
|
|
144
|
+
else:
|
|
145
|
+
logger.success(f"Site created: {domain}")
|
|
146
|
+
|
|
85
147
|
return 0
|
|
86
148
|
|
|
87
149
|
|
|
@@ -365,12 +365,31 @@ class InteractiveMode:
|
|
|
365
365
|
default="3000",
|
|
366
366
|
validate=lambda _, x: check_port(x) or "Invalid port",
|
|
367
367
|
),
|
|
368
|
+
inquirer.Confirm(
|
|
369
|
+
"ssl",
|
|
370
|
+
message="Configure SSL certificate?",
|
|
371
|
+
default=True,
|
|
372
|
+
),
|
|
368
373
|
]
|
|
369
|
-
|
|
374
|
+
|
|
370
375
|
answers = inquirer.prompt(questions, theme=GreenPassion())
|
|
371
376
|
if not answers:
|
|
372
377
|
return 0
|
|
373
|
-
|
|
378
|
+
|
|
379
|
+
# Ask about www if SSL enabled and domain is a base domain
|
|
380
|
+
from wasm.validators.domain import should_include_www
|
|
381
|
+
include_www = False
|
|
382
|
+
if answers["ssl"] and should_include_www(answers["domain"]):
|
|
383
|
+
www_questions = [
|
|
384
|
+
inquirer.Confirm(
|
|
385
|
+
"include_www",
|
|
386
|
+
message=f"Include www.{answers['domain']} in certificate and web server config?",
|
|
387
|
+
default=True,
|
|
388
|
+
),
|
|
389
|
+
]
|
|
390
|
+
www_answers = inquirer.prompt(www_questions, theme=GreenPassion())
|
|
391
|
+
include_www = www_answers.get("include_www", True) if www_answers else False
|
|
392
|
+
|
|
374
393
|
from argparse import Namespace
|
|
375
394
|
args = Namespace(
|
|
376
395
|
verbose=self.verbose,
|
|
@@ -379,8 +398,10 @@ class InteractiveMode:
|
|
|
379
398
|
webserver=answers["webserver"],
|
|
380
399
|
template=answers["template"],
|
|
381
400
|
port=int(answers["port"]),
|
|
401
|
+
no_ssl=not answers["ssl"],
|
|
402
|
+
www=include_www,
|
|
382
403
|
)
|
|
383
|
-
|
|
404
|
+
|
|
384
405
|
from wasm.cli.commands.site import handle_site
|
|
385
406
|
return handle_site(args)
|
|
386
407
|
|
|
@@ -410,7 +410,17 @@ def _add_site_parser(subparsers) -> None:
|
|
|
410
410
|
default=3000,
|
|
411
411
|
help="Backend port for proxy",
|
|
412
412
|
)
|
|
413
|
-
|
|
413
|
+
create.add_argument(
|
|
414
|
+
"--no-ssl",
|
|
415
|
+
action="store_true",
|
|
416
|
+
help="Skip SSL certificate configuration",
|
|
417
|
+
)
|
|
418
|
+
create.add_argument(
|
|
419
|
+
"--www",
|
|
420
|
+
action="store_true",
|
|
421
|
+
help="Include www subdomain in SSL certificate and web server config",
|
|
422
|
+
)
|
|
423
|
+
|
|
414
424
|
# site list
|
|
415
425
|
list_cmd = site_sub.add_parser(
|
|
416
426
|
"list",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|