-
Notifications
You must be signed in to change notification settings - Fork 2
/
.platform.app.yaml
99 lines (88 loc) · 2.28 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
# The name of this app. Must be unique within a project.
name: app
# The type of the application to build.
type: php:8.0
build:
flavor: "none"
# Define timezone for correct cron handling.
timezone: 'Europe/Brussels'
variables:
# Setting php.ini config
php:
memory_limit: 256M
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 -e
cd symfony
composer install --no-dev --prefer-dist --no-progress --no-interaction --optimize-autoloader
deploy: |
set -e
cd symfony
rm -rf var/cache/$APP_ENV/*
bin/console doctrine:migrations:migrate --no-interaction
bin/console assets:install --symlink --relative public
bin/console cache:clear
# The relationships of the application with services or other applications.
relationships:
database: "mysqldb:mysql"
# rabbitmqqueue: "rabbitmq:rabbitmq"
rediscache: "cacheredis:redis"
essearch: "searchelastic:elasticsearch"
# 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:
"/symfony/var/cache":
source: local
source_path: "cache"
"/symfony/var/log":
source: local
source_path: "log"
"/symfony/var/sessions":
source: local
source_path: "sessions"
"/symfony/public/bundles":
source: local
source_path: "bundle-assets"
# The configuration of app when it is exposed to the web.
web:
locations:
"/":
# The public directory of the app, relative to its root.
root: "symfony/public"
# The front-controller script to send non-static requests to.
passthru: "/index.php"
# Workers
#workers:
# queue:
# commands:
# start: |
# php bin/console messenger:consume async --time-limit=3600
# relationships:
# database: 'mysqldb:mysql'
# Scheduled cron jobs.
# see https://docs.platform.sh/configuration/app/cron.html#cron-jobs
crons:
backup:
spec: '0 5 * * *'
cmd: |
if [ "$PLATFORM_BRANCH" = master ]; then
platform backup:create --yes --no-wait
fi
# Extensions
runtime:
extensions:
- sodium
- pdo
- pdo_mysql
- opcache
- intl
- gd
- bcmath
- igbinary
- redis