forked from platformsh/platformsh-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
applications.yaml
131 lines (111 loc) · 3.85 KB
/
applications.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
- # The name of this application, which must be unique within a project.
name: 'docs'
# The type key specifies the language and version for your application.
type: 'nodejs:20'
# Specify the Hugo version as an env variable.
variables:
env:
HUGOVERSION: 0.125.0
SITE_DIR: 'sites/platform'
build:
flavor: none
source:
root: "/"
relationships:
search: "search:http"
database: "db:mysql"
# The hooks that will be triggered when the package is deployed.
hooks:
# Build hooks can modify the application files on disk but not access any services like databases.
build: |
set -e
cd $SITE_DIR
cp ../../themes/psh-docs/postcss.config.js .
npm install
npm run build
./build_docs.sh
npm run build:assets
deploy: |
cd $SITE_DIR
./deploy.sh
bash ./marker.sh "deployed" "${SITE_DIR}"
post_deploy:
cd $SITE_DIR && bash ./marker.sh "post_deploy" "${SITE_DIR}"
# The configuration of the application when it is exposed to the web.
web:
commands:
# Run (404) error and feedback handler
start: cd $SITE_DIR && node index.js
locations:
'/':
# The public directory of the application relative to its root.
root: 'sites/platform/public'
passthru: true
index: ['index.html']
scripts: false
allow: true
expires: 24h
rules:
\.(css|js|gif|jpe?g|png|ttf|eot|woff2?|otf|cast|mp4|json|yaml|ico|svg?|cast|mp4|json|yaml|svg?|ttf)$:
expires: 4w
disk: 1024
mounts:
"sites/platform/public/scripts/xss/dist/config":
source: local
source_path: "sites/platform/config"
size: S
- # The name of this application, which must be unique within a project.
name: 'upsun'
# The type key specifies the language and version for your application.
type: 'nodejs:20'
# Specify the Hugo version as an env variable.
variables:
env:
HUGOVERSION: 0.125.0
SITE_DIR: 'sites/upsun'
build:
flavor: none
source:
root: "/"
relationships:
search: "search:http"
database: "db:mysql"
# The hooks that will be triggered when the package is deployed.
hooks:
# Build hooks can modify the application files on disk but not access any services like databases.
build: |
cd $SITE_DIR
cp ../../themes/psh-docs/postcss.config.js .
npm install
npm run build
./build_docs.sh
npm run build:assets
deploy: |
cd $SITE_DIR
./deploy.sh
bash ./marker.sh "deployed" "${SITE_DIR}"
post_deploy:
cd $SITE_DIR && bash ./marker.sh "post_deploy" "${SITE_DIR}"
# The configuration of the application when it is exposed to the web.
web:
commands:
# Run (404) error and feedback handler
start: cd $SITE_DIR && node index.js
locations:
'/':
# The public directory of the application relative to its root.
root: 'sites/upsun/public'
passthru: true
index: ['index.html']
scripts: false
allow: true
expires: 24h
rules:
\.(css|js|gif|jpe?g|png|ttf|eot|woff2?|otf|cast|mp4|json|yaml|ico|svg?|cast|mp4|json|yaml|svg?|ttf)$:
expires: 4w
disk: 1024
mounts:
"sites/upsun/public/scripts/xss/dist/config":
source: local
source_path: "sites/upsun/config"
size: S