Skip to content

Commit

Permalink
PP-6029: Update PaaS manifest
Browse files Browse the repository at this point in the history
I've updated the Node version to 12.11.1 which is a supported PaaS
version. The Docker image builds successfully with this version.

I simplified the manifest, removing the proxy environment variables
because I think those should be set during the "infrastructure"
provisioning step globally for all apps. Also they're not needed in the
dev environments. I've added a `dev.yml` which just defines dummy values
for some of the variables.

Frontend only uses `CONNECTOR_URL` in tests and does not use
`CONNECTOR_TOKEN_URL` at all.

Also pass in internal urls in their entirety rather than making assumptions
about their structure.

So to push this app to your dev environment:

```
cf push \
  --vars-file dev.yml \
  --var space=dev-yourname \
  --var card_frontend_url=pay-card-frontend-dev-yourname.london.cloudapps.digital
```

PaaS will take care of running `npm install`.

Pair: @vixus0 @mrlumbu
  • Loading branch information
vixus0 committed Jan 20, 2020
1 parent 94dcf03 commit 1730d85
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 37 deletions.
4 changes: 4 additions & 0 deletions dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
memory: 500M
disk_quota: 500M
card_frontend_session_encryption_key: asdjhbwefbo23r23rbfik2roiwhefwbqw
card_connector_analytics_tracking_id: testing-123
30 changes: 10 additions & 20 deletions manifest.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
---
applications:
- name: card-frontend
buildpack: nodejs_buildpack
buildpacks:
- nodejs_buildpack
health-check-type: http
health-check-http-endpoint: '/healthcheck'
health-check-invocation-timeout: 5
memory: 1G
disk_quota: 1G
command: node start.js
memory: ((memory))
disk_quota: ((disk_quota))
command: npm start
env:
NODE_ENV: production
http_proxy: ((http_proxy_url))
HTTP_PROXY: ((http_proxy_url))
HTTP_PROXY_HOST: ((http_proxy_host))
HTTP_PROXY_PORT: ((http_proxy_port))
https_proxy: ((http_proxy_url))
HTTPS_PROXY: ((http_proxy_url))
HTTPS_PROXY_HOST: ((http_proxy_host))
HTTPS_PROXY_PORT: ((http_proxy_port))
HTTP_PROXY_ENABLED: ((http_proxy_enabled))
NO_PROXY: ((http_no_proxy))
SESSION_ENCRYPTION_KEY: ((card_frontend_session_encryption_key))
COOKIE_MAX_AGE: '5400000'
CONNECTOR_TOKEN_URL: http://card-connector-((space)).apps.internal:8080/v1/frontend/tokens/{chargeTokenId}
CONNECTOR_URL: http://card-connector-((space)).apps.internal:8080
CONNECTOR_HOST: http://card-connector-((space)).apps.internal:8080
CONNECTOR_HOST: ((card_connector_url))
ANALYTICS_TRACKING_ID: ((card_connector_analytics_tracking_id))
CARDID_HOST: http://cardid-((space)).apps.internal:8080
CARDID_HOST: ((cardid_url))
NODE_WORKER_COUNT: '1'
FRONTEND_URL: https://((card_frontend_url))
ADMINUSERS_URL: http://adminusers-((space)).apps.internal:8080

ADMINUSERS_URL: ((adminusers_url))
routes:
- route: ((card_frontend_url))
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"license": "MIT",
"engines": {
"node": "12.2.0"
"node": "12.11.1"
},
"standard": {
"globals": [
Expand Down

0 comments on commit 1730d85

Please sign in to comment.