This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.platform.app.yaml
executable file
·102 lines (85 loc) · 3.33 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# 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 runtime the application uses.
type: "php:7.3"
# Configuration of the build of this application.
build:
flavor: composer
# The build-time dependencies of the app.
dependencies:
php:
"drush/drush": "^8.0"
"drupal/console": "@stable"
# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
relationships:
database: "mysqldb:mysql"
# solr: "solrsearch:solr"
# redis: "rediscache:redis"
# The configuration of app when it is exposed to the web.
web:
# Specific parameters for different URL prefixes.
locations:
"/":
# The folder to serve static assets for this location from.
# (Relative to the application root.)
root: "web"
# How long to allow static assets from this location to be cached.
# (Can be a time or -1 for no caching. Times can be suffixed with
# "ms" (milliseconds), "s" (seconds), "m" (minutes), "h" (hours),
# "d" (days), "w" (weeks), "M" (months, 30d) or "y" (years, 365d).)
expires: -1
# Whether to forward disallowed and missing resources from this
# location to the application.
# (Can be true, false or a URI path string.)
passthru: "/index.php"
# Deny access to static files in this location.
allow: false
# Rules for specific URI patterns.
rules:
# Allow access to common static files.
'\.(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 access to all files in the public files directory.
allow: true
expires: 5m
passthru: '/index.php'
root: 'web/sites/default/files'
# Do not execute PHP scripts.
scripts: false
rules:
# Provide a longer TTL (2 weeks) for aggregated CSS and JS files.
'^/sites/default/files/(css|jss)':
expires: 2w
# The size of the persistent disk of the application (in MB).
disk: 2048
# The mounts that will be performed when the package is deployed.
mounts:
"/web/sites/default/files": "shared:files/files"
"/tmp": "shared:files/tmp"
"/private": "shared:files/private"
# The hooks executed at various points in the lifecycle of the application.
hooks:
# We run deploy hook after your application has been deployed and started.
# @TODO Re-import configuration
deploy: |
cd web
drush -y cache-rebuild
drush -y updatedb
drush -y fra --bundle=social
drush -y entup
# The configuration of scheduled execution.
# @TODO Add more crons to make sure the stream is up to date.
crons:
drupal_cron1:
spec: "*/5 * * * *"
cmd: "cd web ; drush core-cron"