Skip to content

Commit

Permalink
use docker for cli commands (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgb authored Jan 3, 2024
1 parent 9e4b6b2 commit 295c968
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ The Plane Controller will be available at http://localhost:8080, and the Plane P

### Connecting to a process

The `dev/cli.sh` script runs the Plane CLI, configured to connect to the local Plane Controller.
The `docker/cli.sh` script runs the Plane CLI, configured to connect to the local Plane Controller.

```bash
dev/cli.sh connect \
docker/cli.sh connect \
--wait \
--cluster 'localhost:9090' \
--image ghcr.io/drifting-in-space/demo-image-drop-four
Expand Down
5 changes: 5 additions & 0 deletions docker/cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

docker run -t --network docker_plane-dev \
plane/plane admin \
--controller http://plane-controller:8080 "$@"
8 changes: 3 additions & 5 deletions docs/pages/quickstart-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ See the [architecture overview](concepts/architecture.mdx) for background on eac

### 3. Connect to a backend

TODO: this part requires Rust; we should replace it with a Docker container.

```bash
dev/cli.sh \
docker/cli.sh \
connect \
--cluster 'localhost:9090' \
--key 'my-first-backend' \
Expand All @@ -49,8 +47,8 @@ If no process is running, Plane will start one (provided that you supply an imag

Here’s a breakdown of the command above:

- `dev/cli.sh` is a lightweight shell script that runs the Plane CLI, pre-configuring it to point to
a Plane instance listening at `localhost:8080` (this corresponds to how the Docker Compose setup is configured).
- `docker/cli.sh` is a shell script that runs the Plane CLI in a Docker container, pre-configuring it to point to
a Plane instance started in the Docker Compose file.
- `connect` is the Plane CLI subcommand for issuing a “connect request”, which will return a URL that routes to
a backend process.
- `--cluster 'localhost:9090'` tells the CLI to start the backend on the `localhost:9090` cluster. Since the cluster name
Expand Down

0 comments on commit 295c968

Please sign in to comment.