-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.platform.app.yaml
135 lines (116 loc) · 4.14 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: app
type: php:8.3
build:
flavor: none
variables:
env:
# Tell Symfony to always install in production-mode.
APP_ENV: 'prod'
APP_DEBUG: 0
# The hooks that will be performed when the package is deployed.
hooks:
build: |
set -x -e
# Restore node_modules from cache if available
if [ -d "$PLATFORM_CACHE_DIR/node_modules" ]; then
echo "Restoring node_modules from cache"
cp -R "$PLATFORM_CACHE_DIR/node_modules" tests/Application/
fi
wkhtmltopdf -V
curl -fs https://get.symfony.com/cloud/configurator | bash
symfony-build
cd tests/Application
yarn install --frozen-lockfile
yarn build:prod
# Cache node_modules for next build
echo "Caching node_modules directory"
rm -rf "$PLATFORM_CACHE_DIR/node_modules"
cp -R node_modules "$PLATFORM_CACHE_DIR/"
deploy: |
set -x -e
cd tests/Application
rm -rf var/cache/*
symfony-deploy
mkdir -p public/media/image
bin/console doctrine:migrations:migrate -n
bin/console sylius:fixtures:load -n
bin/console assets:install --symlink --relative public
bin/console cache:warmup
# 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: "database:mysql"
dependencies:
nodejs:
yarn: "*"
php:
composer/composer: '^2'
ruby:
"wkhtmltopdf-binary": "> 0.12.6"
# The size of the persistent disk of the application (in MB).
disk: 2048
# The mounts that will be performed when the package is deployed.
mounts:
"/tests/Application/var/cache": "shared:files/cache"
"/tests/Application/var/log": "shared:files/log"
"/tests/Application/var/sessions": "shared:files/sessions"
"/tests/Application/public/uploads": "shared:files/uploads"
"/tests/Application/public/media": "shared:files/media"
"/tests/Application/public/assets": "shared:files/assets"
"/tests/Application/public/bundles": "shared:files/bundles"
"/tests/Application/private/credit_memos/": "shared:files/credit_memos"
"/tests/Application/node_modules/.cache": "shared:files/node_modules/.cache"
# The configuration of app when it is exposed to the web.
web:
locations:
"/":
# The public directory of the app, relative to its root.
root: "tests/Application/public"
# The front-controller script to send non-static requests to.
passthru: "/index.php"
allow: true
expires: -1
scripts: true
'/assets/shop':
expires: 2w
passthru: true
allow: false
rules:
# Only allow static files from the assets directories.
'\.(css|js|jpe?g|png|gif|svgz?|ico|bmp|tiff?|wbmp|ico|jng|bmp|html|pdf|otf|woff2|woff|eot|ttf|jar|swf|ogx|avi|wmv|asf|asx|mng|flv|webm|mov|ogv|mpe|mpe?g|mp4|3gpp|weba|ra|m4a|mp3|mp2|mpe?ga|midi?)$':
allow: true
'/media/image':
expires: 2w
passthru: true
allow: false
rules:
# Only allow static files from the assets directories.
'\.(jpe?g|png|gif|svgz?)$':
allow: true
'/media/cache/resolve':
passthru: "/index.php"
expires: -1
allow: true
scripts: true
'/media/cache':
expires: 2w
passthru: true
allow: false
rules:
# Only allow static files from the assets directories.
'\.(jpe?g|png|gif|svgz?)$':
allow: true
runtime:
extensions:
- apcu
- ctype
- iconv
- mbstring
- pdo_pgsql
- sodium
- xsl
resources:
base_memory: 64
memory_ratio: 128