Skip to content

Commit b2f8c94

Browse files
committed
Merge 2.2 into 2.3
2 parents a8ae4b4 + c6b87fc commit b2f8c94

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

deployment/kubernetes.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,42 +47,42 @@ docker push gcr.io/test-api-platform/varnish
4747

4848
Firstly you need to update helm dependencies by running:
4949

50-
```
51-
helm dependency update ./api/helm/api
50+
```console
51+
helm dependency update ./api/helm/api
5252
```
5353

5454
You are now ready to deploy the API!
5555

5656
Deploy your API to the container:
5757

58-
```
59-
helm install ./api/helm/api --namespace=baz --name baz \
60-
--set php.repository=gcr.io/test-api-platform/php \
61-
--set nginx.repository=gcr.io/test-api-platform/nginx \
62-
--set secret=MyAppSecretKey \
63-
--set postgresql.postgresPassword=MyPgPassword \
64-
--set postgresql.persistence.enabled=true \
65-
--set corsAllowOrigin='^https?://[a-z\]*\.mywebsite.com$'
58+
```console
59+
helm install ./api/helm/api --namespace=baz --name baz \
60+
--set php.repository=gcr.io/test-api-platform/php \
61+
--set nginx.repository=gcr.io/test-api-platform/nginx \
62+
--set secret=MyAppSecretKey \
63+
--set postgresql.postgresPassword=MyPgPassword \
64+
--set postgresql.persistence.enabled=true \
65+
--set corsAllowOrigin='^https?://[a-z\]*\.mywebsite.com$'
6666
```
6767

6868
If you prefer to use a managed DBMS like [Heroku Postgres](https://www.heroku.com/postgres) or
6969
[Google Cloud SQL](https://cloud.google.com/sql/docs/postgres/) (recommended):
7070

71-
```
72-
helm install --name api ./api/helm/api \
73-
# ...
74-
--set postgresql.enabled=false \
75-
--set postgresql.url=pgsql://username:password@host/database?serverVersion=9.6
71+
```console
72+
helm install --name api ./api/helm/api \
73+
# ...
74+
--set postgresql.enabled=false \
75+
--set postgresql.url=pgsql://username:password@host/database?serverVersion=9.6
7676
```
7777

7878
If you want to use a managed Varnish such as [Fastly](https://www.fastly.com) for the invalidation cache mechanism
7979
provided by API Platform:
8080

81-
```
82-
helm install --name api ./api/helm/api \
83-
# ...
84-
--set varnish.enabled=false \
85-
--set varnish.url=https://myvarnish.com
81+
```console
82+
helm install --name api ./api/helm/api \
83+
# ...
84+
--set varnish.enabled=false \
85+
--set varnish.url=https://myvarnish.com
8686
```
8787

8888
Finally, build the `client` and `admin` JavaScript apps and [deploy them on a static
@@ -92,6 +92,9 @@ website hosting service](https://github.com/facebookincubator/create-react-app/b
9292

9393
Before running your application for the first time, be sure to create the database schema:
9494

95+
```console
96+
PHP_POD=$(kubectl --namespace=bar get pods -l app=php -o jsonpath="{.items[0].metadata.name}")
97+
kubectl --namespace=bar exec -it $PHP_POD -- bin/console doctrine:schema:create
9598
```
9699
PHP_POD=$(kubectl --namespace=bar get pods -l app=php -o jsonpath="{.items[0].metadata.name}")
97100
kubectl --namespace=bar exec -it $PHP_POD -- bin/console doctrine:schema:create

0 commit comments

Comments
 (0)