trefoil-cli 0.4.0__tar.gz → 0.6.0__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.
- {trefoil_cli-0.4.0 → trefoil_cli-0.6.0}/PKG-INFO +1 -1
- {trefoil_cli-0.4.0 → trefoil_cli-0.6.0}/package.py +9 -4
- {trefoil_cli-0.4.0 → trefoil_cli-0.6.0}/pyproject.toml +1 -1
- {trefoil_cli-0.4.0 → trefoil_cli-0.6.0}/trefoil_cli.egg-info/PKG-INFO +1 -1
- {trefoil_cli-0.4.0 → trefoil_cli-0.6.0}/setup.cfg +0 -0
- {trefoil_cli-0.4.0 → trefoil_cli-0.6.0}/trefoil_cli.egg-info/SOURCES.txt +0 -0
- {trefoil_cli-0.4.0 → trefoil_cli-0.6.0}/trefoil_cli.egg-info/dependency_links.txt +0 -0
- {trefoil_cli-0.4.0 → trefoil_cli-0.6.0}/trefoil_cli.egg-info/entry_points.txt +0 -0
- {trefoil_cli-0.4.0 → trefoil_cli-0.6.0}/trefoil_cli.egg-info/requires.txt +0 -0
- {trefoil_cli-0.4.0 → trefoil_cli-0.6.0}/trefoil_cli.egg-info/top_level.txt +0 -0
|
@@ -15,7 +15,7 @@ Usage: trefoil <domain> <command> [args]
|
|
|
15
15
|
|
|
16
16
|
trefoil init [DIR] [--example=NAME]
|
|
17
17
|
trefoil update
|
|
18
|
-
trefoil engine start [--settings=backend.yml] [--port=8080] [
|
|
18
|
+
trefoil engine start [--settings=backend.yml] [--port=8080] [--foreground]
|
|
19
19
|
trefoil engine stop
|
|
20
20
|
trefoil config package path/to/config.yml [-o bundle.json]
|
|
21
21
|
trefoil config sync [path/to/config.yml] [--server URL]
|
|
@@ -224,11 +224,15 @@ def cmd_engine_start(args):
|
|
|
224
224
|
sys.exit(f"trefoil: env_file {host} (from {args.settings}) not found")
|
|
225
225
|
target = env_file if os.path.isabs(env_file) else os.path.normpath(f"/trefoil/settings/{env_file}")
|
|
226
226
|
cmd += ["-v", f"{host}:{target}:ro"]
|
|
227
|
-
if args.
|
|
227
|
+
if not args.foreground:
|
|
228
228
|
cmd.append("-d")
|
|
229
229
|
cmd.append(args.image)
|
|
230
230
|
print(f"trefoil: {' '.join(cmd)}", file=sys.stderr)
|
|
231
|
-
|
|
231
|
+
code = subprocess.run(cmd, stdout=subprocess.DEVNULL if not args.foreground else None).returncode
|
|
232
|
+
if code == 0 and not args.foreground:
|
|
233
|
+
print(f"trefoil: engine running on http://localhost:{args.port} "
|
|
234
|
+
f"(logs: docker logs -f {args.name}, stop: trefoil engine stop)", file=sys.stderr)
|
|
235
|
+
sys.exit(code)
|
|
232
236
|
|
|
233
237
|
|
|
234
238
|
def cmd_engine_stop(args):
|
|
@@ -585,7 +589,8 @@ def main():
|
|
|
585
589
|
engine_start.add_argument("--name", default="trefoil-api", help="container name (default: trefoil-api)")
|
|
586
590
|
engine_start.add_argument("--volume", default="trefoil-data",
|
|
587
591
|
help="docker volume (or host path) for the data dir (default: trefoil-data)")
|
|
588
|
-
engine_start.add_argument("
|
|
592
|
+
engine_start.add_argument("--foreground", action="store_true",
|
|
593
|
+
help="run attached instead of in the background")
|
|
589
594
|
engine_start.set_defaults(func=cmd_engine_start)
|
|
590
595
|
engine_stop = engine.add_parser("stop", help="stop the running API server container")
|
|
591
596
|
engine_stop.add_argument("--name", default="trefoil-api", help="container name (default: trefoil-api)")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|