-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
30-symfony-flex.yaml
82 lines (69 loc) · 2.32 KB
/
30-symfony-flex.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
requirements:
- type: file_exists
value: composer.json
- type: has_composer_package
value: symfony/flex
template: |
name: {{.Slug}}
type: php:{{.PhpVersion}}
runtime:
extensions:
{{ if php_extension_available "apcu" $.PhpVersion -}}
- apcu
{{ end -}}
{{- if php_extension_available "mbstring" $.PhpVersion -}}
- mbstring
{{ end -}}
{{- if php_extension_available "sodium" $.PhpVersion -}}
- sodium
{{ end -}}
{{ range $ext := php_extensions -}}
{{- if php_extension_available $ext $.PhpVersion -}}
- {{ $ext }}
{{ end -}}
{{- end }}
#variables:
# php:
# # uncomment on PHP 7.4+
# #opcache.preload: config/preload.php
build:
flavor: none
disk: 512
web:
locations:
"/":
root: "{{.PublicDirectory}}"
expires: 1h
passthru: "/{{.FrontController}}"
{{ if has_composer_package "symfony/messenger" -}}
workers:
messenger:
# PHP background workers usually don't require much CPU. See
# https://symfony.com/doc/current/cloud/cookbooks/resources_allocation.html
# for more information
size: XS
resources:
base_memory: 64 # Keep in sync with the `memory-limit` flag value
memory_ratio: 128
commands:
# Don't forget to update your receiver name(s)
start: symfony console --time-limit=3600 --memory-limit=64M messenger:consume async
{{- end }}
mounts:
"/var": { source: local, source_path: var }
{{ if file_exists "templates/debug/source_code.html.twig" -}}
"/data": { source: local, source_path: "data" }
{{- end }}
hooks:
build: |
set -x -e
curl -fs https://get.symfony.com/cloud/configurator | bash
{{ range $ext := php_extensions -}}
{{- if not (php_extension_available $ext $.PhpVersion) -}}
# php-ext-install {{ $ext }} X.Y.Z
{{ end -}}
{{- end }}
NODE_VERSION=18 symfony-build
deploy: |
set -x -e
symfony-deploy