@@ -29,7 +29,7 @@ Change the name "test-api-platform" to your Google project ID (not the project n
29
29
[ Quickstart Google Cloud] ( https://cloud.google.com/sdk/docs/quickstart?hl=de )
30
30
If you do not have gcloud yet, install it with these command.
31
31
32
- ```
32
+ ``` console
33
33
curl https://sdk.cloud.google.com | bash
34
34
```
35
35
@@ -38,7 +38,7 @@ curl https://sdk.cloud.google.com | bash
38
38
Versioning: The 0.1.0 is the version. This value should be the same as the attribute ` appVersion ` in ` Chart.yaml ` .
39
39
Infos for [ Google Container pulling and pushing] ( https://cloud.google.com/container-registry/docs/pushing-and-pulling )
40
40
41
- ```
41
+ ``` console
42
42
docker build -t gcr.io/test-api-platform/php:0.1.0 -t gcr.io/test-api-platform/php:latest api --target api_platform_php
43
43
docker build -t gcr.io/test-api-platform/caddy:0.1.0 -t gcr.io/test-api-platform/caddy:latest api --target api_platform_caddy
44
44
docker build -t gcr.io/test-api-platform/pwa:0.1.0 -t gcr.io/test-api-platform/pwa:latest pwa --target api_platform_pwa_prod
@@ -55,7 +55,7 @@ docker push gcr.io/test-api-platform/pwa
55
55
56
56
Optional push the version images:
57
57
58
- ```
58
+ ``` console
59
59
docker push gcr.io/test-api-platform/php:0.1.0
60
60
docker push gcr.io/test-api-platform/caddy:0.1.0
61
61
docker push gcr.io/test-api-platform/pwa:0.1.0
@@ -70,15 +70,15 @@ The result should look similar to these images.
70
70
71
71
### 1. Check the Helm version
72
72
73
- ```
73
+ ``` console
74
74
helm version
75
75
```
76
76
77
77
If you are using version 2.x follow this [ guide to migrate Helm to v3] ( https://helm.sh/docs/topics/v2_v3_migration/#helm )
78
78
79
79
### 2. Firstly you need to update helm dependencies by running
80
80
81
- ```
81
+ ``` console
82
82
helm dependency update ./helm/api-platform
83
83
```
84
84
@@ -87,13 +87,13 @@ Actual this is [bitnami/postgresql](https://bitnami.com/stack/postgresql/helm),
87
87
88
88
### 3. Optional: If you made changes to the Helm chart, check if its format is correct
89
89
90
- ```
90
+ ``` console
91
91
helm lint ./helm/api-platform
92
92
```
93
93
94
94
### 4. Deploy your API to the container
95
95
96
- ```
96
+ ``` console
97
97
helm upgrade main ./helm/api-platform --namespace=default --create-namespace --wait \
98
98
--install \
99
99
--set "php.image.repository=gcr.io/test-api-platform/php" \
@@ -125,7 +125,7 @@ get access on your local machine to the deploy. See image below.
125
125
If you prefer to use a managed DBMS like [ Heroku Postgres] ( https://www.heroku.com/postgres ) or
126
126
[ Google Cloud SQL] ( https://cloud.google.com/sql/docs/postgres/ ) (recommended):
127
127
128
- ```
128
+ ``` console
129
129
helm upgrade api-platform ./helm/api-platform \
130
130
# ...
131
131
--set postgresql.enabled=false \
@@ -140,7 +140,7 @@ site hosting service](https://create-react-app.dev/docs/deployment/).
140
140
You can access the php container of the pod with the following command.
141
141
In this example the symfony console is called.
142
142
143
- ```
143
+ ``` console
144
144
CADDY_PHP_POD=$(kubectl --namespace=default get pods -l app.kubernetes.io/name=api-platform -o jsonpath="{.items[0].metadata.name}")
145
145
kubectl --namespace=default exec -it $CADDY_PHP_POD -c api-platform-php -- bin/console
146
146
```
@@ -171,7 +171,6 @@ You have to use the *.image.pullPolicy=Always see the last 3 parameters.
171
171
``` console
172
172
PHP_POD=$(kubectl --namespace=bar get pods -l app=php -o jsonpath="{.items[0].metadata.name}")
173
173
kubectl --namespace=bar exec -it $PHP_POD -- bin/console doctrine:schema:create
174
- ```
175
174
helm upgrade api-platform ./helm/api-platform --namespace=default \
176
175
--set "php.image.repository=gcr.io/test-api-platform/php" \
177
176
--set php.image.tag=latest \
@@ -200,7 +199,7 @@ Start by creating a new template for the queue-worker-deployment. The `deploymen
200
199
201
200
Add the following lines under ` containers ` to overwrite the command.
202
201
203
- ```
202
+ ``` yaml
204
203
command :
205
204
{{ range .Values.queue_worker.command }}
206
205
- {{ . | quote }}
@@ -213,14 +212,14 @@ args:
213
212
214
213
Here is an example on how to use it from your ` values.yaml ` :
215
214
216
- ```
215
+ ``` yaml
217
216
command : ['bin/console']
218
217
commandArgs : ['messenger:consume', 'async', '--memory-limit=100M']
219
218
` ` `
220
219
221
220
The ` readinessProbe` and the `livenessProble` can not use the default `docker-healthcheck` but should test if the command is running.
222
221
223
- ```
222
+ ` ` ` yaml
224
223
readinessProbe:
225
224
exec:
226
225
command: ["/bin/sh", "-c", "/bin/ps -ef | grep messenger:consume | grep -v grep"]
0 commit comments