-
Notifications
You must be signed in to change notification settings - Fork 0
/
.platform.app.yaml
117 lines (106 loc) · 2.95 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
name: sylius
type: php:8.3
relationships:
database: "db:mysql"
disk: 2048
mounts:
"config/jwt":
source: local
source_path: jwt
"/var/cache":
source: local
source_path: cache
"/var/log":
source: local
source_path: log
"/var/sessions":
source: local
source_path: sessions
"/public/assets":
source: local
source_path: assets
"/public/bundles":
source: local
source_path: bundles
"/public/uploads":
source: local
source_path: uploads
"/public/media":
source: local
source_path: media
web:
locations:
"/":
root: "public"
passthru: "/index.php"
allow: true
expires: -1
scripts: true
'/assets/shop':
expires: 2w
passthru: true
allow: false
rules:
'\.(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:
'\.(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:
'\.(jpe?g|png|gif|svgz?)$':
allow: true
variables:
env:
APP_ENV: 'prod'
APP_DEBUG: 0
N_PREFIX: /app/.global
build:
flavor: composer
dependencies:
nodejs:
n: "*"
yarn: "*"
php:
composer/composer: '^2'
crons:
sylius-cancel-unpaid-orders:
spec: "0 2 * * *"
cmd: "php bin/console --env=prod sylius:cancel-unpaid-orders"
sylius-remove-expired-carts:
spec: "0 2 * * *"
cmd: "php bin/console --env=prod sylius:remove-expired-carts"
hooks:
build: |
set -e
n auto
hash -r
curl -sS https://get.symfony.com/cli/installer | bash
mv "$PLATFORM_APP_DIR/.symfony5/bin/symfony" "$PLATFORM_APP_DIR/.global/bin/symfony"
cat >> "$PLATFORM_APP_DIR/.global/environment" <<EOS
export \$(symfony var:export)
EOS
yarn install --frozen-lockfile
yarn build:prod
deploy: |
set -e
rm -rf var/cache/*
mkdir -p public/media/image
bin/console doctrine:database:create --if-not-exists
bin/console doctrine:migrations:migrate -n
bin/console sylius:fixtures:load -n
bin/console lexik:jwt:generate-keypair --skip-if-exists
bin/console assets:install --symlink --relative public
bin/console cache:clear