mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-13 14:43:03 +00:00
Add dev exec
command for debugging apps in dev mode
This commit is contained in:
parent
afc4b15253
commit
52f04d909e
@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥".
|
|||||||
|
|
||||||
## Latest
|
## Latest
|
||||||
|
|
||||||
|
- [Feature] Add `dev exec` command
|
||||||
- [Bugfix] Fix incorrect notes settings definition
|
- [Bugfix] Fix incorrect notes settings definition
|
||||||
- [Improvement] Make it possible to start/stop/reboot a selection of services
|
- [Improvement] Make it possible to start/stop/reboot a selection of services
|
||||||
- [Improvement] Add ``local/k8s reboot`` commands
|
- [Improvement] Add ``local/k8s reboot`` commands
|
||||||
|
@ -33,6 +33,19 @@ def run(root, edx_platform_path, edx_platform_settings, service, command, args):
|
|||||||
root, edx_platform_path, edx_platform_settings, port, *run_command
|
root, edx_platform_path, edx_platform_settings, port, *run_command
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@click.command(
|
||||||
|
help="Exec a command in a running container",
|
||||||
|
context_settings={"ignore_unknown_options": True},
|
||||||
|
)
|
||||||
|
@opts.root
|
||||||
|
@click.argument("service")
|
||||||
|
@click.argument("command")
|
||||||
|
@click.argument("args", nargs=-1)
|
||||||
|
def execute(root, service, command, args):
|
||||||
|
exec_command = ["exec", service, command]
|
||||||
|
if args:
|
||||||
|
exec_command += args
|
||||||
|
docker_compose(root, *exec_command)
|
||||||
|
|
||||||
@click.command(help="Run a development server")
|
@click.command(help="Run a development server")
|
||||||
@opts.root
|
@opts.root
|
||||||
@ -131,6 +144,7 @@ def service_port(service):
|
|||||||
|
|
||||||
|
|
||||||
dev.add_command(run)
|
dev.add_command(run)
|
||||||
|
dev.add_command(execute, name="exec")
|
||||||
dev.add_command(runserver)
|
dev.add_command(runserver)
|
||||||
dev.add_command(stop)
|
dev.add_command(stop)
|
||||||
dev.add_command(watchthemes)
|
dev.add_command(watchthemes)
|
||||||
|
Loading…
Reference in New Issue
Block a user