This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
.platform.app.yaml
90 lines (77 loc) · 2.76 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
# 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: php
# The toolstack used to build the application.
type: php:5.6
build:
flavor: symfony
# 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: "mysql:mysql"
# The configuration of app when it is exposed to the web.
web:
# The public directory of the app, relative to its root.
document_root: "/web"
# The front-controller script to send non-static requests to.
passthru: "/app.php"
whitelist:
# slides
- ^/slides/.*\.html$
# CSS and Javascript.
- \.css$
- \.js$
# image/* types.
- \.gif$
- \.jpe?g$
- \.png$
- \.ico
# robots.txt.
- /robots\.txt$
# 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:
"/app/cache": "shared:files/cache"
"/app/logs": "shared:files/logs"
# The hooks that will be performed when the package is deployed.
hooks:
build: |
rm web/app_dev.php
# place sqlite file into /tmp so that we can write to it during deploy
sed -i 's@%kernel.root_dir%/app.sqlite@/tmp/app.sqlite@' app/config/parameters.yml
# install platform.sh cli to .platformsh/bin
curl -sS https://platform.sh/cli/installer | php
deploy: |
# force clearing the cache
rm -rf app/cache/prod
app/console --env=prod cache:warmup
app/console --env=prod doctrine:phpcr:init:dbal --drop --force
app/console --env=prod doctrine:phpcr:repository:init
app/console --env=prod doctrine:phpcr:fixtures:load -n
runtime:
extensions:
- name: blackfire
configuration:
server_id: "ce95eba9-2d90-48b7-ad75-fcad42e1bcab"
server_token: "ca7e32ac2d466ecfdf30b8ac43bdfef1304fc3feeb66e8906c1192b435e206f0"
cron:
symfony:
spec: '0 1 * * *'
cmd: |
# force clearing the cache
rm -rf app/cache/prod
app/console --env=prod cache:warmup
app/console --env=prod doctrine:phpcr:init:dbal --drop --force
app/console --env=prod doctrine:phpcr:repository:init
app/console --env=prod doctrine:phpcr:fixtures:load -n
renewcert:
# Force a redeploy at 1 am (UTC) on the 1st and 15th of every month.
spec: '0 1 1,15 * *'
cmd: |
if [ "$PLATFORM_BRANCH" = master ]; then
platform redeploy --yes --no-wait
fi