forked from itk-event-database/event-database-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.platform.app.yaml
68 lines (58 loc) · 2.3 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
# 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: app
# The type of the application to build.
type: php:7.0
runtime:
extensions:
- redis
- apcu
build:
flavor: none
# 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: "mysqldb:mysql"
redis: "rediscache:redis"
# The configuration of app when it is exposed to the web.
web:
locations:
"/":
# The public directory of the app, relative to its root.
root: "web"
# The front-controller script to send non-static requests to.
passthru: "/app.php"
# 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/cache": "shared:files/cache"
"/var/logs": "shared:files/logs"
"/var/sessions": "shared:files/sessions"
"/var/jwt": "shared:files/jwt"
"/web/files": "shared:files/files"
"/web/uploads": "shared:files/uploads"
# The hooks that will be performed when the package is deployed.
hooks:
build: |
SYMFONY_ENV=prod composer install --no-dev --no-interaction --no-progress --prefer-dist --optimize-autoloader
rm -fr var/cache/*/* web/app_dev.php
SYMFONY_ENV=prod bin/console assets:install --no-debug
deploy: |
SYMFONY_ENV=prod bin/console doctrine:migrations:migrate --no-interaction
SYMFONY_ENV=prod bin/console cache:clear
# https://support.platform.sh/hc/en-us/requests/12477
crons:
resque:
spec: '*/5 * * * *'
# Tell the worker to exit if the job queue is empty (--interval=00).
# It must be --interval=00 (double 0) since '00' is not empty
# (cf. https://github.com/resquebundle/resque/blob/master/bin/resque#L49-L52)
cmd: 'SYMFONY_ENV=prod bin/console resque:worker-start default --foreground --interval=00'
feed_reader:
# Read feeds once every hour
spec: '0 * * * *'
cmd: 'SYMFONY_ENV=prod bin/console events:feeds:read'