diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index e8ed4911..a8045f45 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -120,12 +120,18 @@ To make changes to pgai: just ext psql-shell ``` -1. Stop and delete the container: +1. Stop and start the container: ```bash # Stop the container just ext docker-stop - # Delete the container + # Start the container + just ext docker-start + +1. Delete the container: + + ```bash + # When stopped, delete the container just ext docker-rm ``` diff --git a/projects/extension/build.py b/projects/extension/build.py index 50d03aa7..b821ffa0 100755 --- a/projects/extension/build.py +++ b/projects/extension/build.py @@ -690,6 +690,12 @@ def docker_run() -> None: subprocess.run(cmd, shell=True, check=True, env=os.environ, text=True) +def docker_start() -> None: + subprocess.run( + """docker start pgai-ext""", shell=True, check=True, env=os.environ, text=True + ) + + def docker_stop() -> None: subprocess.run( """docker stop pgai-ext""", shell=True, check=True, env=os.environ, text=True @@ -766,6 +772,8 @@ def run() -> None: docker_build() elif action == "docker-run": docker_run() + elif action == "docker-start": + docker_start() elif action == "docker-stop": docker_stop() elif action == "docker-rm": diff --git a/projects/extension/justfile b/projects/extension/justfile index f8004693..37696123 100644 --- a/projects/extension/justfile +++ b/projects/extension/justfile @@ -85,6 +85,9 @@ docker-build: docker-run: @./build.py docker-run +docker-start: + @./build.py docker-start + docker-stop: @./build.py docker-stop