@@ -41,35 +41,43 @@ package manager) chart to deploy in a wink on any of these platforms.
41
41
42
42
Firstly you need to update helm dependencies by running:
43
43
44
+ ```
44
45
helm dependency update ./api/helm/api
46
+ ```
45
47
46
48
You are now ready to deploy the API!
47
49
48
50
Deploy your API to the container:
49
51
52
+ ```
50
53
helm install ./api/helm/api --namespace=baz --name baz \
51
54
--set php.repository=gcr.io/test-api-platform/php \
52
55
--set nginx.repository=gcr.io/test-api-platform/nginx \
53
56
--set secret=MyAppSecretKey \
54
57
--set postgresql.postgresPassword=MyPgPassword \
55
58
--set postgresql.persistence.enabled=true \
56
59
--set corsAllowOrigin='^https?://[a-z\]*\.mywebsite.com$'
60
+ ```
57
61
58
62
If you prefer to use a managed DBMS like [ Heroku Postgres] ( https://www.heroku.com/postgres ) or
59
63
[ Google Cloud SQL] ( https://cloud.google.com/sql/docs/postgres/ ) (recommended):
60
64
65
+ ```
61
66
helm install --name api ./api/helm/api \
62
67
# ...
63
68
--set postgresql.enabled=false \
64
69
--set postgresql.url=pgsql://username:password@host/database?serverVersion=9.6
70
+ ```
65
71
66
72
If you want to use a managed Varnish such as [ Fastly] ( https://www.fastly.com ) for the invalidation cache mechanism
67
73
provided by API Platform:
68
74
75
+ ```
69
76
helm install --name api ./api/helm/api \
70
77
# ...
71
78
--set varnish.enabled=false \
72
79
--set varnish.url=https://myvarnish.com
80
+ ```
73
81
74
82
Finally, build the ` client ` and ` admin ` JavaScript apps and [ deploy them on a static
75
83
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
78
86
79
87
Before running your application for the first time, be sure to create the database schema:
80
88
89
+ ```
81
90
PHP_POD=$(kubectl --namespace=bar get pods -l app=php -o jsonpath="{.items[0].metadata.name}")
82
91
kubectl --namespace=bar exec -it $PHP_POD -- bin/console doctrine:schema:create
83
92
0 commit comments