Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit 4595454

Browse files
authored
Add restart policy to docker commands (#13)
1 parent 03a1fbc commit 4595454

6 files changed

Lines changed: 15 additions & 17 deletions

File tree

docs/how-to/configure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ extra configuration parameters to the container as environment variables:
1111
```bash {2}
1212
docker run --name codegate -d -p 8989:8989 -p 9090:80 \
1313
[-e KEY=VALUE ...] \
14-
ghcr.io/stacklok/codegate
14+
--restart unless-stopped ghcr.io/stacklok/codegate
1515
```
1616

1717
## Config parameters
@@ -38,7 +38,7 @@ To use OpenRouter, set the vLLM URL when you launch CodeGate:
3838
```bash {2}
3939
docker run --name codegate -d -p 8989:8989 -p 9090:80 \
4040
-e CODEGATE_VLLM_URL=https://openrouter.ai/api \
41-
ghcr.io/stacklok/codegate
41+
--restart unless-stopped ghcr.io/stacklok/codegate
4242
```
4343

4444
Then, [configure the Continue IDE plugin](./use-with-continue.mdx) to access the

docs/how-to/dashboard.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To access the dashboard, ensure port 80 is bound to a port on your local system
1212
when you launch CodeGate, for example:
1313

1414
```bash
15-
docker run --name codegate -d -p 8989:8989 -p 9090:80 ghcr.io/stacklok/codegate:latest
15+
docker run --name codegate -d -p 8989:8989 -p 9090:80 --restart unless-stopped ghcr.io/stacklok/codegate:latest
1616
```
1717

1818
Open [http://localhost:9090](http://localhost:9090) in your web browser to view
@@ -41,7 +41,7 @@ container. This example creates a volume named `codegate_volume`:
4141
```bash {2}
4242
docker run --name codegate -d -p 8989:8989 -p 9090:80 \
4343
--mount type=volume,src=codegate_volume,dst=/app/codegate_volume \
44-
ghcr.io/stacklok/codegate:latest
44+
--restart unless-stopped ghcr.io/stacklok/codegate:latest
4545
```
4646

4747
:::note

docs/how-to/install.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ scenario.
3030
Run with minimal functionality for use with **Continue**:
3131

3232
```bash
33-
docker run -d -p 8989:8989 -p 9090:80 ghcr.io/stacklok/codegate:latest
33+
docker run -d -p 8989:8989 -p 9090:80 --restart unless-stopped ghcr.io/stacklok/codegate:latest
3434
```
3535

3636
The container runs in the background (`-d`), binds the CodeGate API endpoint to
@@ -40,14 +40,14 @@ Mount a **persistent volume** to the container (see
4040
[Persisting dashboard data](./dashboard.md#persisting-dashboard-data)):
4141

4242
```bash
43-
docker run --name codegate -d -p 8989:8989 -p 9090:80 --mount type=volume,src=codegate_volume,dst=/app/codegate_volume ghcr.io/stacklok/codegate:latest
43+
docker run --name codegate -d -p 8989:8989 -p 9090:80 --mount type=volume,src=codegate_volume,dst=/app/codegate_volume --restart unless-stopped ghcr.io/stacklok/codegate:latest
4444
```
4545

46-
**Copilot support:** enable the HTTP proxy port and mount a persistent volume (see
47-
[Use CodeGate with GitHub Copilot](./use-with-copilot.mdx)):
46+
**Copilot support:** enable the HTTP proxy port and mount a persistent volume
47+
(see [Use CodeGate with GitHub Copilot](./use-with-copilot.mdx)):
4848

4949
```bash
50-
docker run --name codegate -d -p 8989:8989 -p 9090:80 -p 8990:8990 --mount type=volume,src=codegate_volume,dst=/app/codegate_volume ghcr.io/stacklok/codegate:latest
50+
docker run --name codegate -d -p 8989:8989 -p 9090:80 -p 8990:8990 --mount type=volume,src=codegate_volume,dst=/app/codegate_volume --restart unless-stopped ghcr.io/stacklok/codegate:latest
5151
```
5252

5353
:::tip
@@ -116,8 +116,8 @@ docker stop codegate
116116
docker rm codegate
117117
```
118118

119-
Finally, launch the new version using the same `docker run` command you used
120-
originally.
119+
Finally, launch the new version using the [same `docker run` command](#examples)
120+
you used originally.
121121

122122
## Manage the CodeGate container
123123

docs/how-to/use-with-copilot.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ inside the container:
6161
docker run --name codegate -d -p 8989:8989 -p 9090:80 \
6262
-p 8990:8990 \
6363
--mount type=volume,src=codegate_volume,dst=/app/codegate_volume \
64-
ghcr.io/stacklok/codegate:latest
64+
--restart unless-stopped ghcr.io/stacklok/codegate:latest
6565
```
6666
</TabItem>
6767
<TabItem value="windows" label="Windows (PowerShell)">
6868
```shell {2-3}
6969
docker run --name codegate -d -p 8989:8989 -p 9090:80 `
7070
-p 8990:8990 `
7171
--mount type=volume,src=codegate_volume,dst=/app/codegate_volume `
72-
ghcr.io/stacklok/codegate:latest
72+
--restart unless-stopped ghcr.io/stacklok/codegate:latest
7373
```
7474

7575
</TabItem>

docs/quickstart-continue.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Download and run the container using Docker:
5151

5252
```bash
5353
docker pull ghcr.io/stacklok/codegate:latest
54-
docker run --name codegate -d -p 8989:8989 -p 9090:80 ghcr.io/stacklok/codegate:latest
54+
docker run --name codegate -d -p 8989:8989 -p 9090:80 --restart unless-stopped ghcr.io/stacklok/codegate:latest
5555
```
5656

5757
This pulls the latest CodeGate image from the GitHub Container Registry and

docs/quickstart-copilot.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ Required software:
3838
Run CodeGate using Docker:
3939

4040
```bash
41-
docker run --name codegate -d -p 8989:8989 -p 9090:80 -p 8990:8990 \
42-
--mount type=volume,src=codegate_volume,dst=/app/codegate_volume \
43-
ghcr.io/stacklok/codegate:latest
41+
docker run --name codegate -d -p 8989:8989 -p 9090:80 -p 8990:8990 --mount type=volume,src=codegate_volume,dst=/app/codegate_volume --restart unless-stopped ghcr.io/stacklok/codegate:latest
4442
```
4543

4644
This pulls the latest CodeGate image from the GitHub Container Registry and

0 commit comments

Comments
 (0)