6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-12 06:07:56 +00:00

Add dev exec command for debugging apps in dev mode

This commit is contained in:
Régis Behmo 2019-07-09 17:57:00 +08:00
parent afc4b15253
commit 52f04d909e
2 changed files with 15 additions and 0 deletions

View File

@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥".
## Latest
- [Feature] Add `dev exec` command
- [Bugfix] Fix incorrect notes settings definition
- [Improvement] Make it possible to start/stop/reboot a selection of services
- [Improvement] Add ``local/k8s reboot`` commands

View File

@ -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
)
@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")
@opts.root
@ -131,6 +144,7 @@ def service_port(service):
dev.add_command(run)
dev.add_command(execute, name="exec")
dev.add_command(runserver)
dev.add_command(stop)
dev.add_command(watchthemes)