-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.platform.app.yaml
87 lines (79 loc) · 2 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
78
79
80
81
82
83
84
85
86
87
# This file describes an application. You can have multiple applications
# in the same project.
#
# See https://docs.platform.sh/user_guide/reference/platform-app-yaml.html
name: 'app'
type: 'php:7.2'
disk: 2048
build:
flavor: composer
relationships:
database: 'mysqldb:mysql'
solr: 'solrsearch:main'
dependencies:
php:
"drush/drush": "^9.0"
mounts:
'/web/sites/default/files': 'shared:files/files'
'/tmp': 'shared:files/tmp'
'/private': 'shared:files/private'
'/.drush': 'shared:files/.drush'
'/drush-backups': 'shared:files/drush-backups'
'/.console': 'shared:files/console'
variables:
env:
PLATFORMSH_CLI_TOKEN: 1b2cfe78605c05df0f05e59b58657ec3043c6b8f
hooks:
build: |
curl -sS https://platform.sh/cli/installer | php
deploy: |
cd web
drush -y updatedb
drush -y config-import
drush -y cache-rebuild
web:
locations:
'/':
root: 'web'
expires: -1
passthru: '/index.php'
allow: false
rules:
'\.(jpe?g|png|gif|svgz?|css|js|map|ico|bmp|eot|woff2?|otf|ttf)$':
allow: true
'^/robots\.txt$':
allow: true
'^/sitemap\.xml$':
allow: true
'/sites/default/files':
allow: true
expires: 3M
passthru: '/index.php'
root: 'web/sites/default/files'
scripts: false
rules:
'^/sites/default/files/(css|js)':
expires: 3M
crons:
drupal:
# Run cron every 20 minutes
spec: '*/20 * * * *'
cmd: 'cd web ; drush core-cron'
drush-cr:
# Clear caches twice a day
spec: '0 7/12 * * *'
cmd: 'cd web ; drush cr'
snapshot:
# Take a snapshot automatically every night at 3 am (UTC).
spec: '0 3 * * *'
cmd: |
if [ "$PLATFORM_BRANCH" = master ]; then
platform snapshot:create --yes --no-wait
fi
renewcert:
# Force a redeploy at 8 am (UTC) on the 14th and 28th of every month.
spec: '0 8 14,28 * *'
cmd: |
if [ "$PLATFORM_BRANCH" = master ]; then
platform redeploy --yes --no-wait
fi