-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathheroku-start.sh
executable file
·60 lines (44 loc) · 1.73 KB
/
heroku-start.sh
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
#!/bin/bash
# This file is started from the Procfile; and is executed from the FLOW_PATH_ROOT.
touch Data/Logs/System.log
touch Data/Logs/Security.log
touch Data/Logs/Query.log
compile_neos_js_css_if_needed() {
cd Packages/Neos/Neos.Neos/Scripts
echo "installing NPM dependencies"
npm install
echo "installing ruby dependencies"
bundle install
npm install -g grunt-cli
grunt build
echo "All Compiled!"
}
if [[ "$COMPILE_NEOS_JS_CSS" != "" ]]; then
echo "Asynchronously compiling Neos CSS and JS"
compile_neos_js_css_if_needed &
fi
# TODO explain why we do this here and not on build
FLOW_CONTEXT=Production/Heroku ./flow resource:publish
FLOW_CONTEXT=Production/Heroku ./flow doctrine:migrate
if [[ "$PRUNE_AND_IMPORT_SITE" != "" ]]; then
echo "Pruning site"
FLOW_CONTEXT=Production/Heroku ./flow site:prune
echo "Importing $PRUNE_AND_IMPORT_SITE"
FLOW_CONTEXT=Production/Heroku php -d memory_limit=2048m ./flow site:import --package-key $PRUNE_AND_IMPORT_SITE
fi
if [[ "$PHP_DEV_MODE" != "" ]]; then
echo "!!! Development Mode: Disabling PHP OpCache"
echo "" >> Packages/Application/Sandstorm.Heroku/Resources/Private/fpm_custom.conf
echo "php_value[opcache.enable] = 0" >> Packages/Application/Sandstorm.Heroku/Resources/Private/fpm_custom.conf
echo "!!! Development Mode: Installing VIM"
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
fi
bin/heroku-php-nginx \
-F Packages/Application/Sandstorm.Heroku/Resources/Private/fpm_custom.conf \
-C Packages/Application/Sandstorm.Heroku/Resources/Private/nginx.inc.conf \
-l Data/Logs/System.log \
-l Data/Logs/Security.log \
-l Data/Logs/Query.log \
Web/