Skip to content

Commit

Permalink
mike docker commands: mount git config
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Madigan <[email protected]>
  • Loading branch information
jasonmadigan committed Dec 5, 2024
1 parent a629b43 commit 458f203
Showing 1 changed file with 45 additions and 9 deletions.
54 changes: 45 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ This repository contains documentation for Kuadrant, built using MkDocs and the
To run the docs using Docker, mount the current directory to the container and bind it to port `8000`:

```bash
docker run -v "$(pwd):/docs" -p 8000:8000 quay.io/kuadrant/docs.kuadrant.io:latest "mkdocs serve -s -a 0.0.0.0:8000"
docker run \
-v "$(pwd):/docs" \
-v "$HOME/.gitconfig:/opt/app-root/src/.gitconfig:ro" \
-p 8000:8000 quay.io/kuadrant/docs.kuadrant.io:latest \
"mkdocs serve -s -a 0.0.0.0:8000"
```

This will serve the docs at [http://localhost:8000](http://localhost:8000).
Expand Down Expand Up @@ -57,7 +61,11 @@ mike serve
Or, with Docker / Podman:

```bash
docker run -v "$(pwd):/docs" -p 8000:8000 quay.io/kuadrant/docs.kuadrant.io:latest "mike serve -a 0.0.0.0:8000"
docker run \
-v "$(pwd):/docs" \
-v "$HOME/.gitconfig:/opt/app-root/src/.gitconfig:ro" \
-p 8000:8000 quay.io/kuadrant/docs.kuadrant.io:latest \
"mike serve -a 0.0.0.0:8000"
```

This will serve the docs from the `gh-pages` branch with multi-versioning. For general development, use `mkdocs serve`.
Expand Down Expand Up @@ -87,7 +95,11 @@ mike list
Docker / Podman:

```bash
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike list"
docker run \
-v "$(pwd):/docs" \
-v "$HOME/.gitconfig:/opt/app-root/src/.gitconfig:ro" \
quay.io/kuadrant/docs.kuadrant.io:latest \
"mike list"
```

#### Deploy a new release with a custom title
Expand All @@ -101,7 +113,11 @@ mike deploy 0.7.0 -t "0.7.0 (dev)"
Docker / Podman:

```bash
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike deploy 0.7.0 -t '0.7.0 (dev)'"
docker run \
-v "$(pwd):/docs" \
-v "$HOME/.gitconfig:/opt/app-root/src/.gitconfig:ro" \
quay.io/kuadrant/docs.kuadrant.io:latest \
"mike deploy 0.7.0 -t '0.7.0 (dev)'"
```

#### Delete a release
Expand All @@ -115,7 +131,11 @@ mike delete 0.7.0
Docker / Podman:

```bash
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike delete 0.7.0"
docker run \
-v "$(pwd):/docs" \
-v "$HOME/.gitconfig:/opt/app-root/src/.gitconfig:ro" \
quay.io/kuadrant/docs.kuadrant.io:latest \
"mike delete 0.7.0"
```

#### Serve multi-versioned docs
Expand All @@ -129,7 +149,11 @@ mike serve -S
Docker / Podman:

```bash
docker run -v "$(pwd):/docs" -p 8000:8000 quay.io/kuadrant/docs.kuadrant.io:latest "mike serve -a 0.0.0.0:8000"
docker run \
-v "$(pwd):/docs" \
-v "$HOME/.gitconfig:/opt/app-root/src/.gitconfig:ro" \
-p 8000:8000 quay.io/kuadrant/docs.kuadrant.io:latest \
"mike serve -a 0.0.0.0:8000"
```

---
Expand Down Expand Up @@ -178,7 +202,11 @@ mike deploy --update-aliases 0.7.0 latest
Docker / Podman:

```bash
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike deploy --update-aliases 0.7.0 latest"
docker run \
-v "$(pwd):/docs" \
-v "$HOME/.gitconfig:/opt/app-root/src/.gitconfig:ro" \
quay.io/kuadrant/docs.kuadrant.io:latest \
"mike deploy --update-aliases 0.7.0 latest --push"
```

4. Set this release as the default version:
Expand All @@ -192,7 +220,11 @@ mike set-default 0.7.0
Docker / Podman:

```bash
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike set-default 0.7.0"
docker run \
-v "$(pwd):/docs" \
-v "$HOME/.gitconfig:/opt/app-root/src/.gitconfig:ro" \
quay.io/kuadrant/docs.kuadrant.io:latest \
"mike set-default 0.7.0"
```

5. Tag the repo (e.g., `git tag 0.7.0 && git push --tags <upstream-origin>`).
Expand Down Expand Up @@ -230,7 +262,11 @@ mike deploy 0.7.0 -t "0.7.0" --push
Docker / Podman:

```bash
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike deploy 0.7.0 -t '0.7.0' --push"
docker run \
-v "$(pwd):/docs" \
-v "$HOME/.gitconfig:/opt/app-root/src/.gitconfig:ro" \
quay.io/kuadrant/docs.kuadrant.io:latest \
"mike deploy 0.7.0 -t '0.7.0' --push"
```

4. If there’s a push error, reset to the latest `gh-pages` branch and try again.
Expand Down

0 comments on commit 458f203

Please sign in to comment.