-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
.platform.app.yaml
84 lines (74 loc) · 2.16 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
name: api_tools_getlaminas_org
type: php:8.1
size: S
disk: 256
build:
flavor: none
variables:
env:
NVM_VERSION: v0.36.0
NODE_VERSION: v14.13.1
dependencies:
php:
composer/composer: "~2.2.0"
nodejs:
gulp-cli: '~2.2.0'
mounts:
'data/cache':
source: local
source_path: data/cache
hooks:
build: |
set -e
unset NPM_CONFIG_PREFIX
curl -o- https://raw.githubusercontent.com/creationix/nvm/$NVM_VERSION/install.sh | dash
export NVM_DIR="$PLATFORM_APP_DIR/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm current
nvm install $NODE_VERSION
echo "Installing platform.sh CLI"
curl -sS https://platform.sh/cli/installer | php
echo "- Installing asset dependencies"
(cd asset ; npm install --no-save)
echo "- Building assets"
(cd asset ; gulp default)
echo "- Removing asset dependencies"
(cd asset ; rm -rf node_modules)
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
composer update laminas-api-tools/documentation
php vendor/bin/laminas get-releases
deploy: |
rm -f data/cache/module-*.php
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)$:
allow: true
expires: 300s