Skip to content

Commit

Permalink
Add missing console styling to Minicube and Kubernetes code block doc…
Browse files Browse the repository at this point in the history
…s in light mode (#1874)
  • Loading branch information
beejaz authored Jan 12, 2024
1 parent 97a3885 commit 80bcedd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion deployment/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ curl https://sdk.cloud.google.com | bash
Versioning: The 0.1.0 is the version. This value should be the same as the attribute `appVersion` in `Chart.yaml`.
Infos for [Google Container pulling and pushing](https://cloud.google.com/container-registry/docs/pushing-and-pulling)

```
```console
docker build -t gcr.io/test-api-platform/php:0.1.0 -t gcr.io/test-api-platform/php:latest api --target php_prod
docker build -t gcr.io/test-api-platform/caddy:0.1.0 -t gcr.io/test-api-platform/caddy:latest api --target caddy_prod
docker build -t gcr.io/test-api-platform/pwa:0.1.0 -t gcr.io/test-api-platform/pwa:latest pwa --target prod
Expand Down
36 changes: 22 additions & 14 deletions deployment/minikube.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ If you have no existing installation of Minikube on your computer, [follow the o

When Minikube is installed, start the cluster:

minikube start --addons registry --addons dashboard
```console
minikube start --addons registry --addons dashboard
```

The previous command starts Minikube with a Docker registry (we'll use it in the next step) and with the Kubernetes dashboard.

Expand All @@ -18,27 +20,33 @@ Finally, [install Helm](https://helm.sh/docs/intro/install/). We'll use it to de

First, build the images:

docker build -t localhost:5000/php api --target api_platform_php
docker build -t localhost:5000/caddy api --target api_platform_caddy
docker build -t localhost:5000/pwa pwa --target api_platform_pwa_prod
```console
docker build -t localhost:5000/php api --target api_platform_php
docker build -t localhost:5000/caddy api --target api_platform_caddy
docker build -t localhost:5000/pwa pwa --target api_platform_pwa_prod
```

Then push the images in the registry installed in Minikube:

docker push localhost:5000/php
docker push localhost:5000/caddy
docker push localhost:5000/pwa
```console
docker push localhost:5000/php
docker push localhost:5000/caddy
docker push localhost:5000/pwa
```

## Deploying

Finally, deploy the project using the Helm chart:

$ helm install my-project helm/api-platform \
--set php.image.repository=localhost:5000/php \
--set php.image.tag=latest \
--set caddy.image.repository=localhost:5000/caddy \
--set caddy.image.tag=latest \
--set pwa.image.repository=localhost:5000/pwa \
--set pwa.image.tag=latest
```console
$ helm install my-project helm/api-platform \
--set php.image.repository=localhost:5000/php \
--set php.image.tag=latest \
--set caddy.image.repository=localhost:5000/caddy \
--set caddy.image.tag=latest \
--set pwa.image.repository=localhost:5000/pwa \
--set pwa.image.tag=latest
```

Copy and paste the commands displayed in the terminal to enable the port forwarding then go to `http://localhost:8080` to access your application!

Expand Down

0 comments on commit 80bcedd

Please sign in to comment.