-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.platform.app.yaml
80 lines (76 loc) · 2.42 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
# IU Demo application configuration for Platform.sh.
#
# See https://docs.platform.sh/user_guide/reference/platform-app-yaml.html
name: 'app'
type: 'php:7.2'
build:
flavor: composer
dependencies:
php:
'drush/drush': '^9.0'
'platformsh/cli': '^3.33.6'
relationships:
database: 'mysqldb:mysql'
# solr: 'solrsearch:solr'
# redis: 'rediscache:redis'
web:
locations:
'/':
root: 'web'
expires: 5m
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/sites\.php$':
scripts: false
'^/sites/[^/]+/settings.*?\.php$':
scripts: false
'/sites/default/files':
allow: true
expires: 5m
passthru: '/index.php'
root: 'web/sites/default/files'
scripts: false
rules:
'^/sites/default/files/(css|js)':
expires: 2w
disk: 2048
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'
hooks:
# The deploy hook runs after your application has been deployed and started.
deploy: |
set -e
./drush/platformsh_generate_drush_yml.php
cd web
drush -y cache-rebuild
drush -y updatedb
drush -y config-import
drush -y entup
timezone: America/Indianapolis
crons:
# The jobs are staggered at :00, :10, :20, :30, :40 to minimize overlap.
drupal:
# Every twenty minutes.
spec: '*/20 * * * *'
cmd: 'cd web ; drush core-cron'
redeploy:
# Redeploy every environment automatically on the 1st and 15th of each
# month at 3:45am to ensure Let's Encrypt certificates are updated.
spec: '45 3 1,15 * *'
cmd: 'platform redeploy --no-wait --yes'
snapshots:
# Take a snapshot of master environment everyday at 3:05am.
spec: '5 3 * * *'
cmd: 'if [ $PLATFORM_BRANCH = "master" ]; then platform snapshot:create --yes --no-wait; fi'