Commit 4096f649c892a619114e7b8f23efd6c7831c5376
1 parent
2b355b5c
Exists in
master
and in
23 other branches
Adding run command to ./script/production
`./script/production run` will start the complete service (app server, ferret server, delayed_job server) in production mode and then wait for a control-C, after which it will stop the service. This is useful for running in production mode during test activities.
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
script/production
| ... | ... | @@ -36,6 +36,13 @@ case "$ACTION" in |
| 36 | 36 | do_$ACTION |
| 37 | 37 | ;; |
| 38 | 38 | |
| 39 | + run) | |
| 40 | + do_start | |
| 41 | + echo "=> Running in production mode. Hit ctrl-C to stop." | |
| 42 | + trap do_stop INT TERM | |
| 43 | + tail -n 0 -f log/production.log | |
| 44 | + ;; | |
| 45 | + | |
| 39 | 46 | restart) |
| 40 | 47 | do_stop |
| 41 | 48 | sleep 1 |
| ... | ... | @@ -43,7 +50,7 @@ case "$ACTION" in |
| 43 | 50 | ;; |
| 44 | 51 | |
| 45 | 52 | *) |
| 46 | - echo "usage: $0 start|stop|restart" | |
| 53 | + echo "usage: $0 start|stop|restart|run" | |
| 47 | 54 | exit 1 |
| 48 | 55 | ;; |
| 49 | 56 | esac | ... | ... |