@@ -6,7 +6,9 @@ If you have no existing installation of Minikube on your computer, [follow the o
6
6
7
7
When Minikube is installed, start the cluster:
8
8
9
- minikube start --addons registry --addons dashboard
9
+ ``` console
10
+ minikube start --addons registry --addons dashboard
11
+ ```
10
12
11
13
The previous command starts Minikube with a Docker registry (we'll use it in the next step) and with the Kubernetes dashboard.
12
14
@@ -18,27 +20,33 @@ Finally, [install Helm](https://helm.sh/docs/intro/install/). We'll use it to de
18
20
19
21
First, build the images:
20
22
21
- docker build -t localhost:5000/php api --target api_platform_php
22
- docker build -t localhost:5000/caddy api --target api_platform_caddy
23
- docker build -t localhost:5000/pwa pwa --target api_platform_pwa_prod
23
+ ``` console
24
+ docker build -t localhost:5000/php api --target api_platform_php
25
+ docker build -t localhost:5000/caddy api --target api_platform_caddy
26
+ docker build -t localhost:5000/pwa pwa --target api_platform_pwa_prod
27
+ ```
24
28
25
29
Then push the images in the registry installed in Minikube:
26
30
27
- docker push localhost:5000/php
28
- docker push localhost:5000/caddy
29
- docker push localhost:5000/pwa
31
+ ``` console
32
+ docker push localhost:5000/php
33
+ docker push localhost:5000/caddy
34
+ docker push localhost:5000/pwa
35
+ ```
30
36
31
37
## Deploying
32
38
33
39
Finally, deploy the project using the Helm chart:
34
40
35
- $ helm install my-project helm/api-platform \
36
- --set php.image.repository=localhost:5000/php \
37
- --set php.image.tag=latest \
38
- --set caddy.image.repository=localhost:5000/caddy \
39
- --set caddy.image.tag=latest \
40
- --set pwa.image.repository=localhost:5000/pwa \
41
- --set pwa.image.tag=latest
41
+ ``` console
42
+ $ helm install my-project helm/api-platform \
43
+ --set php.image.repository=localhost:5000/php \
44
+ --set php.image.tag=latest \
45
+ --set caddy.image.repository=localhost:5000/caddy \
46
+ --set caddy.image.tag=latest \
47
+ --set pwa.image.repository=localhost:5000/pwa \
48
+ --set pwa.image.tag=latest
49
+ ```
42
50
43
51
Copy and paste the commands displayed in the terminal to enable the port forwarding then go to ` http://localhost:8080 ` to access your application!
44
52
0 commit comments