forked from phalcon/rest-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboxfile.yml
More file actions
138 lines (122 loc) · 2.89 KB
/
Copy pathboxfile.yml
File metadata and controls
138 lines (122 loc) · 2.89 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Runtime configuration
run.config:
# Main engine
engine: php
engine.config:
# Using the PHP 7.2 runtime
runtime: php-7.2
# Apache
document_root: api/public
# php.ini settings
allow_url_fopen: 'On'
# Timezone/Locale/Mimetype/Encoding
date_timezone: 'UTC'
default_locale: 'en_US'
default_mimetype: 'text/html'
iconv_internal_encoding: 'UTF-8'
# Security
expose_php: 'Off'
disable_functions:
# - exec
- shell_exec
- system
# Error reporting
display_errors: 'stderr'
error_reporting: E_ALL
# Execution/Input Vars/Memory Limit
max_execution_time: 30
max_input_time: 60
max_input_vars: 1000
memory_limit: '128M'
# Register argc/globals
register_argc_argv: 'Off'
register_globals: 'Off'
# Session is stored in memcached
session_save_handler: 'memcached'
session_save_path: '${DATA_API_MEMCACHED}:11211'
session_length: 3600
session_autostart: 'false'
# Enabled extensions
extensions:
- curl
- json
- iconv
- igbinary
- mbstring
- memcached
- pdo
- pdo_mysql
- phalcon
- session
- zip
zend_extensions:
- opcache
dev_extensions:
add:
- ctype
- dom
- simplexml
- tokenizer
- xml
- xmlwriter
dev_zend_extensions:
add:
- xdebug
rm:
- opcache
extra_steps:
- echo "alias phalcon=\'phalcon.php\'" >> /data/var/home/gonano/.bashrc
- cp /app/storage/ci/xdebug.ini /data/etc/php.dev.d/xdebug.ini
# Components
# Memcached
data.api_memcached:
image: nanobox/memcached:1.4
config:
max_connections: 1024
# MySQL - database
data.api_mysql:
image: nanobox/mysql:5.7
config:
plugins:
- federated
event_scheduler: 'Off'
# Website setup
web.tdm:
# Autostart services
start:
php: start-php
apache: start-apache
# Only one route
routes:
- /
# Writable folders for logs and cache
writable_dirs:
- storage/cache/data
- storage/cache/metadata
- storage/cache/view
- storage/cache/volt
- storage/files
- storage/logs
# The log to watch
log_watch:
app[error]: /app/storage/logs/api.log
# Deploy configuration
deploy.config:
# Transformations - before deployment
transform:
# Copy setup files
- cp /app/storage/ci/.env.prod /app/.env
- cp /app/storage/ci/phinx.php.prod /app/phinx.php
# Force create any folders that do not exist
- mkdir -p /app/storage/cache/data
- mkdir -p /app/storage/cache/metadata
- mkdir -p /app/storage/cache/volt
- mkdir -p /app/storage/cache/view
- mkdir -p /app/storage/files
- mkdir -p /app/storage/logs
# Clear the log for this deployment
- truncate -s 0 /app/storage/logs/api.log
after_live:
web.tdm:
# Run migrations after deployment
- /app/vendor/bin/phinx migrate