-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathmta.yaml
133 lines (126 loc) · 3.64 KB
/
mta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
## Generated mta.yaml based on template version 0.4.0
## appName = pg-beershop
## language=nodejs; multiTenant=false
## approuter=
_schema-version: "3.1"
ID: pg-beershop
version: 1.0.0
description: "Sample project to demonstrate the use of @cap-js/postgres"
parameters:
enable-parallel-deployments: true
build-parameters:
before-all:
- builder: custom
commands:
- npm ci
- cds build --production
# Should not be required anymore https://cap.cloud.sap/docs/guides/databases-postgres#with-a-deployer-app
# but cds build --production doesn't create the gen/pg folder
- ./pg-build.sh
# - mkdir -p gen/db-with-express
# - npm run copy:db:gen
modules:
# DB Deploy with combined apt and Node.JS buildpack
- name: pg-beershop-db-deployer
type: nodejs
path: gen/pg
parameters:
no-route: true
no-start: true
disk-quota: 1GB
memory: 256MB
tasks:
- name: deploy-to-postgresql
command: ./task.sh
disk-quota: 1GB
memory: 256MB
buildpack: nodejs_buildpack
build-parameters:
ignore:
- "node_modules/"
requires:
# - name: pg-beershop-external-database
- name: pg-beershop-database
# ----------------- DB-UI with adminer -----------------------
- name: pg-beershop-adminer
type: application
build-parameters:
no-source: true
parameters:
# Only needed to track down issues in the PostgreSQL Database deployment
no-route: false
no-start: true
disk-quota: 256MB
memory: 128MB
docker:
image: dockette/adminer:pgsql
instances: 1
requires:
- name: pg-beershop-database
# - name: pg-beershop-external-database
# --------------------- SERVER MODULE ------------------------
- name: pg-beershop-srv
# ------------------------------------------------------------
type: nodejs
path: gen/srv
build-parameters:
ignore:
- "node_modules/"
parameters:
memory: 256M
disk-quota: 1024M
# enable-ssh: true # allows to `cf ssh pg-beershop-srv`
provides:
- name: srv-api # required by consumers of CAP services (e.g. approuter)
properties:
srv-url: ${default-url}
requires:
- name: pg-beershop-database
- name: pg-beershop-uaa
# - name: pg-beershop-external-database
- name: pg-beershop-app
type: nodejs
path: app
build-parameters:
ignore:
- "node_modules/"
parameters:
memory: 256M
disk-quota: 1024M
requires:
- name: pg-beershop-destination-service
- name: pg-beershop-uaa
- name: srv-api
group: destinations
properties:
forwardAuthToken: true
strictSSL: false
name: srv_api
url: ~{srv-url}
resources:
- name: pg-beershop-uaa
parameters:
path: ./xs-security.json
type: com.sap.xs.uaa
# In SAP CP Trial only the first deployment using this definition works
- name: pg-beershop-database
type: org.cloudfoundry.managed-service
parameters:
path: ./pg-options.json
service: postgresql-db
service-plan: trial
skip-service-updates:
parameters: true
service-tags:
- plain
# - name: pg-beershop-external-database
# type: org.cloudfoundry.user-provided-service
# parameters:
## path: ./default-azure-ups-env.json
# path: ./default-btp-ups-env.json
# service-tags: ["relational", "database","plain"]
- name: pg-beershop-destination-service
parameters:
service-plan: lite
service: destination
type: org.cloudfoundry.managed-service