-
Notifications
You must be signed in to change notification settings - Fork 2
/
.platform.app.yaml
84 lines (71 loc) · 2.11 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
# This file describes an application. You can have multiple applications
# in the same project.
# The name of this app. Must be unique within a project.
name: swagbraintreeappinfrastructure
# The type of the application to build.
type: php:8.2
build:
flavor: composer
dependencies:
php:
composer/composer: '^2'
nodejs:
n: '*'
runtime:
extensions:
- sodium
variables:
env:
# Tell Symfony to always install in production-mode.
APP_NAME: SwagBraintreeApp
APP_ENV: 'prod'
APP_DEBUG: 0
CORS_ALLOW_ORIGIN: '*'
DATABASE_URL: mysql://user:@database.internal:3306/main
N_PREFIX: /app/.global
crons:
snapshot:
spec: 0 0 * * *
cmd: |
# only run for the production environment, aka trunk
if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then
bin/console report:turnover
code="$?"
if [ "$code" -ne "0" ]; then
printf 'Turnover report exited with %s\n' "$code"
fi
fi
# The hooks that will be performed when the package is deployed.
hooks:
build: |
set -e
n auto
hash -r
npm install
npm run build
deploy: |
set -e
bin/console cache:clear
bin/console doctrine:database:create --if-not-exists
bin/console doctrine:migrations:migrate --no-interaction
# 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: 'db:mysql'
# 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:
"/var":
source: local
source_path: "var"
# The configuration of app when it is exposed to the web.
web:
locations:
"/":
# The public directory of the app, relative to its root.
root: "public"
# The front-controller script to send non-static requests to.
passthru: "/index.php"