File tree Expand file tree Collapse file tree 4 files changed +26
-2
lines changed
Expand file tree Collapse file tree 4 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 1616 # Install tools, required for building
1717 apt-get update && \
1818 apt-get install -y --no-install-recommends \
19- # In general...
19+ # For building (will be removed)
2020 autoconf \
2121 build-essential \
2222 curl \
4343 # For Honcho
4444 python \
4545 python-pip \
46- python-pkg-resources && \
46+ python-pkg-resources \
47+
48+ # Fron crontab
49+ cron && \
4750
4851 pip install honcho && \
4952
Original file line number Diff line number Diff line change 11nginx : /usr/local/sbin/nginx
22phpfpm : /usr/local/sbin/php-fpm
3+ cron : /usr/sbin/cron -f
Original file line number Diff line number Diff line change @@ -51,6 +51,18 @@ Xdebug was installed mainly with the idea of providing code coverage for PHPUnit
5151configured for any specific use case. You can [ configure Xdebug] ( https://xdebug.org/docs/all ) via
5252` php.ini ` if desired.
5353
54+ ### Crontab
55+
56+ Crontab is already installed. In order to deploy a crontab file, you would need
57+ to store a valid crontab file to ` /crontab/USERNAME ` , where ` USERNAME ` has to
58+ be an ** existing** user. This is important, because any contrab instructions
59+ will be executed as the user, specified by the filename.
60+
61+ Usually, you would like to run all your crontab instructions as ** www-data** .
62+ So you should mount your crontab file to ` /crontab/www-data ` (or under
63+ ` /crontab/root ` if needed - needless to say you should try to avoid this
64+ whenever possible).
65+
5466### Honcho
5567
5668If you want to overwrite the default Honcho configuration - mount your custom ` Procfile ` file at ` / ` .
Original file line number Diff line number Diff line change @@ -28,6 +28,14 @@ if [[ $ENABLE_XDEBUG == "1" ]]; then
2828 echo -e " \e[32mXdebug enabled\e[0m"
2929fi
3030
31+ # Deploy available crontabs
32+ if [[ -d /crontab ]]; then
33+ for crontab_file in $( ls /crontab) ; do
34+ crontab -u $crontab_file /crontab/$crontab_file
35+ done
36+ fi
37+
38+ # Start Honcho
3139if [[ $1 == " server" ]]; then
3240 exec honcho -d / start
3341fi
You can’t perform that action at this time.
0 commit comments