-
Notifications
You must be signed in to change notification settings - Fork 32
/
.platform.app.yaml
91 lines (80 loc) · 2.83 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
# .platform.app.yaml
# The name of this application, which must be unique within a project.
name: 'app'
# The type key specifies the language and version for your application.
type: 'php:8.1'
# On PHP, there are multiple build flavors available. Pretty much everyone
# except Drupal 7 and Backdrop users will want the composer flavor.
build:
flavor: none
# 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: 'db:mysql'
# The build-time dependencies of the app.
dependencies:
php:
"drush/drush": "^8.0"
# The hooks that will be triggered when the package is deployed.
hooks:
# Build hooks can modify the application files on disk but not access any services like databases.
build: |
set -e
# Install Drush integration for Backdrop
VERSION=1.x-1.x
mkdir -p .drush/commands
cd .drush/commands
wget https://github.com/backdrop-contrib/backdrop-drush-extension/archive/refs/heads/$VERSION.zip
unzip $VERSION.zip -d backdrop
rm $VERSION.zip
deploy: |
set -e
# Force Platform.sh file paths.
drush scr set_psh_file_paths.php
# Import configuration on deploy.
cd $PLATFORM_APP_DIR/web
drush cc drush
drush updb -y
drush bcim -y
drush cc all
# The size of the persistent disk of the application (in MB).
disk: 2048
# The 'mounts' describe writable, persistent filesystem mounts in the application.
# The keys are directory paths relative to the application root.
mounts:
'/web/files':
source: local
source_path: 'web-files'
'/tmp':
source: local
source_path: 'tmp'
'/private':
source: local
source_path: 'private'
'/config/active':
source: local
source_path: 'active'
'/config/staging':
source: local
source_path: 'staging'
# The configuration of the application when it is exposed to the web.
web:
locations:
'/':
# The public directory of the application relative to its root.
root: 'web'
# The front-controller script which determines where to send
# non-static requests.
passthru: '/index.php'
# Allow uploaded files to be served, but do not run scripts.
# Missing files get mapped to the front controller above.
'/files':
# Allow access to all files in the public files directory.
allow: true
expires: 5m
passthru: '/index.php'
root: 'web/files'
# Do not execute PHP scripts.
scripts: false