Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add just ext docker-start cmd #331

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
8 changes: 8 additions & 0 deletions projects/extension/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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":
Expand Down
3 changes: 3 additions & 0 deletions projects/extension/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ docker-build:
docker-run:
@./build.py docker-run

docker-start:
@./build.py docker-start

docker-stop:
@./build.py docker-stop

Expand Down
Loading