Skip to content

Add missing console styling to Minicube and Kubernetes code block docs in light mode #1874

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

Merged
merged 2 commits into from
Jan 12, 2024
Merged
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
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