Skip to content

Commit c6b87fc

Browse files
committed
lint
1 parent dd33139 commit c6b87fc

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

deployment/kubernetes.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,60 +18,60 @@ package manager) chart to deploy in a wink on any of these platforms.
1818

1919
1. Build the PHP and Nginx Docker images:
2020

21-
```
22-
docker build -t gcr.io/test-api-platform/php -t gcr.io/test-api-platform/php:latest api
23-
docker build -t gcr.io/test-api-platform/nginx -t gcr.io/test-api-platform/nginx:latest -f api/Dockerfile.nginx api
24-
docker build -t gcr.io/test-api-platform/varnish -t gcr.io/test-api-platform/varnish:latest -f api/Dockerfile.varnish api
21+
```console
22+
docker build -t gcr.io/test-api-platform/php -t gcr.io/test-api-platform/php:latest api
23+
docker build -t gcr.io/test-api-platform/nginx -t gcr.io/test-api-platform/nginx:latest -f api/Dockerfile.nginx api
24+
docker build -t gcr.io/test-api-platform/varnish -t gcr.io/test-api-platform/varnish:latest -f api/Dockerfile.varnish api
2525
```
2626

2727
2. Push your images to your Docker registry, example with [Google Container Registry](https://cloud.google.com/container-registry/):
2828

29-
```
30-
gcloud docker -- push gcr.io/test-api-platform/php
31-
gcloud docker -- push gcr.io/test-api-platform/nginx
32-
gcloud docker -- push gcr.io/test-api-platform/varnish
29+
```console
30+
gcloud docker -- push gcr.io/test-api-platform/php
31+
gcloud docker -- push gcr.io/test-api-platform/nginx
32+
gcloud docker -- push gcr.io/test-api-platform/varnish
3333
```
3434

3535
## Deploying
3636

3737
Firstly you need to update helm dependencies by running:
3838

39-
```
40-
helm dependency update ./api/helm/api
39+
```console
40+
helm dependency update ./api/helm/api
4141
```
4242

4343
You are now ready to deploy the API!
4444

4545
Deploy your API to the container:
4646

47-
```
48-
helm install ./api/helm/api --namespace=baz --name baz \
49-
--set php.repository=gcr.io/test-api-platform/php \
50-
--set nginx.repository=gcr.io/test-api-platform/nginx \
51-
--set secret=MyAppSecretKey \
52-
--set postgresql.postgresPassword=MyPgPassword \
53-
--set postgresql.persistence.enabled=true \
54-
--set corsAllowOrigin='^https?://[a-z\]*\.mywebsite.com$'
47+
```console
48+
helm install ./api/helm/api --namespace=baz --name baz \
49+
--set php.repository=gcr.io/test-api-platform/php \
50+
--set nginx.repository=gcr.io/test-api-platform/nginx \
51+
--set secret=MyAppSecretKey \
52+
--set postgresql.postgresPassword=MyPgPassword \
53+
--set postgresql.persistence.enabled=true \
54+
--set corsAllowOrigin='^https?://[a-z\]*\.mywebsite.com$'
5555
```
5656

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

60-
```
61-
helm install --name api ./api/helm/api \
62-
# ...
63-
--set postgresql.enabled=false \
64-
--set postgresql.url=pgsql://username:password@host/database?serverVersion=9.6
60+
```console
61+
helm install --name api ./api/helm/api \
62+
# ...
63+
--set postgresql.enabled=false \
64+
--set postgresql.url=pgsql://username:password@host/database?serverVersion=9.6
6565
```
6666

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

70-
```
71-
helm install --name api ./api/helm/api \
72-
# ...
73-
--set varnish.enabled=false \
74-
--set varnish.url=https://myvarnish.com
70+
```console
71+
helm install --name api ./api/helm/api \
72+
# ...
73+
--set varnish.enabled=false \
74+
--set varnish.url=https://myvarnish.com
7575
```
7676

7777
Finally, build the `client` and `admin` JavaScript apps and [deploy them on a static
@@ -81,7 +81,7 @@ website hosting service](https://github.com/facebookincubator/create-react-app/b
8181

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

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

0 commit comments

Comments
 (0)