-
Notifications
You must be signed in to change notification settings - Fork 166
Expand file tree
/
Copy pathmta.yaml
More file actions
92 lines (88 loc) · 2.68 KB
/
mta.yaml
File metadata and controls
92 lines (88 loc) · 2.68 KB
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
_schema-version: '2.1'
ID: bookshop-pg
version: 1.0.0
description: "CAP Java Bookshop on PostgreSQL with UI"
parameters:
enable-parallel-deployments: true
modules:
# --------------------- SERVER MODULE ------------------------
- name: bookshop-pg-srv
# ------------------------------------------------------------
type: java
path: srv
parameters:
memory: 1024M
disk-quota: 512M
buildpack: java_buildpack
properties:
SPRING_PROFILES_ACTIVE: cloud
JBP_CONFIG_COMPONENTS: '{jres: ["JavaBuildpack::Jre::SapMachineJRE"]}'
JBP_CONFIG_SAP_MACHINE_JRE: '{ jre: { version: "25.+" } }'
# We do not want cfenv to configure the DataSource for us
# cfenv uses names of the services, so this variable must be adapted if needed
# as CFENV_SERVICE_[service-name]_ENABLED
# See https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html
CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false
build-parameters:
builder: custom
commands:
- mvn clean package -DskipTests=true
build-result: target/*-exec.jar
requires:
- name: bookshop-pg-db
- name: bookshop-pg-uaa
- name: cf-logging
provides:
- name: srv-api
properties:
srv-url: '${default-url}'
# --------------------- APPROUTER MODULE ---------------------
- name: bookshop-pg-app
# ------------------------------------------------------------
type: approuter.nodejs
path: app
parameters:
memory: 256M
disk-quota: 512M
requires:
- name: srv-api
group: destinations
properties:
name: backend
url: ~{srv-url}
forwardAuthToken: true
strictSSL: true
- name: bookshop-pg-uaa
provides:
- name: app-api
properties:
app-url: '${default-url}'
# --------------------- RESOURCES ---------------------
resources:
# -----------------------------------------------------
- name: bookshop-pg-uaa
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
path: ./xs-security.json
config: # override xsappname as it needs to be unique
xsappname: bookshop-pg-${org}-${space}
oauth2-configuration:
redirect-uris:
- ~{app-api/app-url}/**
requires:
- name: app-api
- name: bookshop-pg-db
type: org.cloudfoundry.managed-service
parameters:
service: postgresql-db
service-plan: standard
config:
engine_version: "16"
multi_az: false
- name: cf-logging
type: org.cloudfoundry.managed-service
parameters:
service: application-logs
service-plan: lite