-
Notifications
You must be signed in to change notification settings - Fork 2
/
.platform.app.yaml
74 lines (65 loc) · 2.25 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
# 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.4"
# Configuration of the build of the application.
build:
flavor: composer
# 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"
# The configuration of app when it is exposed to the web.
web:
locations:
"/":
# The public directory of the app, relative to its root.
root: "web"
# The front-controller script to send non-static requests to.
passthru: "/index.php"
# Wordpress has multiple roots (wp-admin) so the following is required
index:
- "index.php"
# The number of seconds whitelisted (static) content should be cached.
expires: 600
scripts: true
allow: true
rules:
'^/wp/xmlrpc\.php$':
scripts: false
allow: false
"/wp-content":
root: "web/wp-content"
scripts: false
allow: false
rules:
'\.(jpe?g|png|gif|svgz?|css|js|map|ico|bmp|eot|woff2?|otf|ttf|pdf|mp4|xls|xlsx|doc|docx|webm|zip|webp)$':
allow: true
"/wp-content/themes":
root: "web/wp-content/themes"
scripts: true
allow: true
"/wp-content/plugins":
root: "web/wp-content/plugins"
scripts: true
allow: true
# The size of the persistent disk of the application (in MB).
disk: 2048
dependencies:
php:
composer/composer: '^2'
# The mounts that will be performed when the package is deployed.
mounts:
"/web/wp-content":
source: local
source_path: "wp-content"
hooks:
deploy: |
set -e
if ! $(wp core is-installed 2> /dev/null); then
rsync -r web/wp/wp-content/* web/wp-content/
fi