-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.platform.app.yaml
77 lines (70 loc) · 1.99 KB
/
.platform.app.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
# This file describes an application. You can have multiple applications
# in the same project.
# The name of this app. Must be unique within a project.
name: app
# The toolstack used to build the application.
type: php:7.1
build:
flavor: none
# The configuration of app when it is exposed to the web.
web:
locations:
"/":
root: "build"
index:
- "index.html"
expires: 300s
scripts: true
allow: false
rules:
\.(css|js|gif|jpe?g|png|ttf|eot|woff2?|otf|html|ico|svg?)$:
allow: true
^/robots\.txt$:
allow: true
search_index\.json$:
allow: true
^/rss\.xml$:
allow: true
^/sitemap\.xml$:
allow: true
^/drupal-feed\.xml$:
allow: true
^/google5640e84dd65cb365\.html$:
allow: true
# The size of the persistent disk of the application (in MB).
disk: 2048
# Build time dependencies.
dependencies:
nodejs:
grunt-cli: "*"
bower: "*"
# The hooks that will be performed when the package is deployed.
hooks:
build: |
set -e
unset NPM_CONFIG_PREFIX
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.2/install.sh | dash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm current
nvm install 10.20.0
curl -sS https://platform.sh/cli/installer | php
npm install
bower install
grunt build
# The configuration of scheduled execution.
crons:
snapshot:
# Take a snapshot automatically every night at 3 am (UTC).
spec: '0 3 * * *'
cmd: |
if [ "$PLATFORM_BRANCH" = master ]; then
/app/.platformsh/bin/platform snapshot:create --yes --no-wait
fi
renewcert:
# Force a redeploy at 9 am (UTC) on the 14th of every month.
spec: '0 9 14 * *'
cmd: |
if [ "$PLATFORM_BRANCH" = master ]; then
/app/.platformsh/bin/platform redeploy --yes --no-wait
fi