forked from laminas/getlaminas.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.platform.app.yaml
75 lines (66 loc) · 1.91 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
name: getlaminas_org
type: php:7.3
size: S
disk: 256
build:
flavor: none
dependencies:
php:
"hirak/prestissimo": "^0.3.10"
nodejs:
gulp-cli: '~2.2.0'
mounts:
'data/cache':
source: local
source_path: data/cache
hooks:
build: |
set -e
echo "Installing platform.sh CLI"
curl -sS https://platform.sh/cli/installer | php
echo "- Installing asset dependencies"
(cd bootstrap ; npm install)
echo "- Building assets"
(cd bootstrap ; gulp deploy)
mv bootstrap/build/assets.json data/
mv bootstrap/build/css public/
mv bootstrap/build/js public/
echo "- Setting up configuration"
rm -f config/development.config.php config/autoload/*.local.php
mv config/autoload/local.php.dist config/autoload/local.php
echo "- Installing application dependencies"
composer install --no-ansi --no-dev --no-interaction --no-scripts --no-plugins --optimize-autoloader
mkdir -p var/blog/feeds
composer build
deploy: |
rm -f data/cache/config-cache.php
if [ ! -e data/cache/releases.rss ];then cp templates/releases.rss data/cache/ ;fi
crons:
snapshot:
# Take a snapshot automatically every night at 3 am (UTC).
spec: '0 3 * * *'
cmd: |
if [ "$PLATFORM_BRANCH" = master ]; then
platform snapshot:create --yes --no-wait
fi
renewcert:
# Force a redeploy at 8 am (UTC) on the 14th and 28th of every month.
spec: '0 8 14,28 * *'
cmd: |
if [ "$PLATFORM_BRANCH" = master ]; then
platform redeploy --yes --no-wait
fi
web:
locations:
'/':
root: 'public'
passthru: '/index.php'
index:
- index.php
expires: -1
scripts: true
allow: false
rules:
\.(css|js|gif|jpe?g|png|ttf|eot|woff2?|otf|cast|mp4|json|html|ico|svg|asc|webmanifest)$:
allow: true
expires: 300s