-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.platform.app.yaml
88 lines (88 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: backend
type: "php:8.3"
runtime:
extensions:
- imagick
- igbinary
- redis
- apcu
variables:
php:
memory_limit: 512M
env:
N_PREFIX: /app/.global
dependencies:
php:
composer/composer: "^2.1"
disk: 35000
resources:
base_memory: 512
memory_ratio: 256
mounts:
"/webroot/sites/default/files": "shared:files/files"
"/webroot/sites/default/files/translations": "shared:files/translations"
"/tmp": "shared:files/tmp"
"/private": "shared:files/private"
"/.drush": "shared:files/.drush"
"/drush-backups": "shared:files/drush-backups"
"/logs":
source: local
source_path: logs
build:
flavor: composer
web:
locations:
/:
root: webroot
expires: 1d
passthru: /index.php
allow: false
rules:
'\.(jpe?g|png|gif|svgz?|css|js|map|ico|bmp|eot|woff2?|otf|ttf|webp)$':
allow: true
expires: 1y
^/robots\.txt$:
allow: true
^/sitemap\.xml$:
allow: true
^/sites/sites\.php$:
scripts: false
'^/sites/[^/]+/settings.*?\.php$':
scripts: false
/sites/default/files:
allow: true
expires: 1y
passthru: /index.php
root: webroot/sites/default/files
scripts: false
hooks:
deploy: |
set -e
mkdir -p /app/webroot/sites/default/files/translations
chmod -R 755 /app/webroot/sites/default/files/translations
cd /app/webroot
/app/vendor/bin/drush -y sset system.maintenance_mode 1 --input-format=integer
/app/vendor/bin/drush -y cache-rebuild
/app/vendor/bin/drush -y updatedb
/app/vendor/bin/drush -y config-import
/app/vendor/bin/drush locale-check
/app/vendor/bin/drush locale-update
/app/vendor/bin/drush image-flush --all
/app/vendor/bin/drush sset system.maintenance_mode 0 --input-format=integer
relationships:
database: "db:mysql"
redis: "redis:redis"
solr:
service: solr
endpoint: main
crons:
# Run Drupal's cron tasks every 1 minutes.
drupal:
spec: "*/1 * * * *"
commands:
start: "/app/vendor/bin/drush core-cron"
source:
operations:
auto-update:
command: |
curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0