Skip to content

Commit 8af059e

Browse files
committed
Merge 2.2 into 2.3
2 parents 8c09648 + dd33139 commit 8af059e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

deployment/kubernetes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,35 +41,43 @@ package manager) chart to deploy in a wink on any of these platforms.
4141

4242
Firstly you need to update helm dependencies by running:
4343

44+
```
4445
helm dependency update ./api/helm/api
46+
```
4547

4648
You are now ready to deploy the API!
4749

4850
Deploy your API to the container:
4951

52+
```
5053
helm install ./api/helm/api --namespace=baz --name baz \
5154
--set php.repository=gcr.io/test-api-platform/php \
5255
--set nginx.repository=gcr.io/test-api-platform/nginx \
5356
--set secret=MyAppSecretKey \
5457
--set postgresql.postgresPassword=MyPgPassword \
5558
--set postgresql.persistence.enabled=true \
5659
--set corsAllowOrigin='^https?://[a-z\]*\.mywebsite.com$'
60+
```
5761

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

65+
```
6166
helm install --name api ./api/helm/api \
6267
# ...
6368
--set postgresql.enabled=false \
6469
--set postgresql.url=pgsql://username:password@host/database?serverVersion=9.6
70+
```
6571

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

75+
```
6976
helm install --name api ./api/helm/api \
7077
# ...
7178
--set varnish.enabled=false \
7279
--set varnish.url=https://myvarnish.com
80+
```
7381

7482
Finally, build the `client` and `admin` JavaScript apps and [deploy them on a static
7583
website hosting service](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#deployment).
@@ -78,6 +86,7 @@ website hosting service](https://github.com/facebookincubator/create-react-app/b
7886

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

89+
```
8190
PHP_POD=$(kubectl --namespace=bar get pods -l app=php -o jsonpath="{.items[0].metadata.name}")
8291
kubectl --namespace=bar exec -it $PHP_POD -- bin/console doctrine:schema:create
8392

0 commit comments

Comments
 (0)