I need chicagoboss work in release mode.

67 views
Skip to first unread message

王维宁

unread,
Nov 10, 2015, 8:03:07 AM11/10/15
to ChicagoBoss
Hello everyone,
 I need chicagoboss work in release mode. but I'm not sure whether chicagoboss can work in release mode.

chan sisowath

unread,
Nov 10, 2015, 9:34:59 AM11/10/15
to chica...@googlegroups.com
hi,  it is possible.

you can check this app to see how to do it.

 https://github.com/mihawk/draw.git



2015-11-10 21:03 GMT+08:00 王维宁 <11726...@qq.com>:
Hello everyone,
 I need chicagoboss work in release mode. but I'm not sure whether chicagoboss can work in release mode.

--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/07aeb425-aba4-49c0-bac0-862ab30026ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Robakowski

unread,
Dec 21, 2015, 1:54:19 PM12/21/15
to ChicagoBoss

Hi mihawk,


thanks for the link to your ChicagoBoss app and the example on how to structure a CB app so that it could be packed through reltool to a ordinary Erlang/OTP app release package.


I’ve successfully adopted this structure to one of our CB app but I’m having the problem that I couldn’t figured it out how you configured Boss to start in production mode and not in development mode? Any ideas or tips?


Greets

David

chan sisowath

unread,
Dec 21, 2015, 10:27:53 PM12/21/15
to chica...@googlegroups.com
hi,

if i remember there is multiple solution:

-1) if you use cowboy as server, you should not include mochiweb as part of your release,
  it will solve your problem de facto

- 2)if you use mochiweb:
  delete reloader.beam from your release,
  edit the mochiweb.app file accordingly
 
-3) create a startup script:
-module(my_init).
-export([init/0, stop/1]).

init() -> put(boss_environment, production).

 
i didn't test 3,
IMHO CB need to be patched here,
because the boss_environement depend on the reloader.beam
which is not correct in release mode.
https://github.com/ChicagoBoss/ChicagoBoss/blob/master/src/boss/boss_env.erl#L28

the best will be to pass argument to the vm in the vm.args file
like or in the config file. sys.config aka boss.config.


mihawk.




Reply all
Reply to author
Forward
0 new messages