Deployed to dev01 on the Rrackspace cloud.
This commit is contained in:
parent
3c3d553768
commit
b59b628cb5
14
Makefile
14
Makefile
@ -2,6 +2,7 @@ MODS = $(wildcard src/*.erl)
|
||||
BEAMS = $(MODS:src/%.erl=ebin/%.beam)
|
||||
TEST_MODS = $(wildcard test/*.erl)
|
||||
TEST_BEAMS = $(TEST_MODS:test/%.erl=test/%.beam)
|
||||
YAWS_ROOT=/usr/lib/yaws/timestamper
|
||||
|
||||
all : compile test
|
||||
|
||||
@ -36,3 +37,16 @@ ebin/%.beam : src/%.erl
|
||||
test/%.beam : test/%.erl
|
||||
@echo Compiling sources...
|
||||
erlc -W -o test $<
|
||||
|
||||
deploy: compile
|
||||
@service yaws stop
|
||||
@echo Removing existing artifacts.
|
||||
@rm -r $(YAWS_ROOT)/*
|
||||
@echo Copying current artifacts.
|
||||
@cp -r www $(YAWS_ROOT)
|
||||
@cp -r ebin $(YAWS_ROOT)
|
||||
@mkdir $(YAWS_ROOT)/include
|
||||
@cp -r src/ts_db_records.hrl $(YAWS_ROOT)/include/.
|
||||
@cp yaws.prod.conf $(YAWS_ROOT)/yaws.conf
|
||||
@service yaws start
|
||||
@echo Done.
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
start() ->
|
||||
ok = application:load(mnesia),
|
||||
ok = application:set_env(mnesia, dir, "/home/jdbernard/projects/timestamper/web-app/db/test"),
|
||||
ok = mnesia:start(),
|
||||
ok.
|
||||
|
||||
@ -12,5 +11,5 @@ create_tables(Nodes) ->
|
||||
{atomic, ok} = id_counter:create_table(TableOpts),
|
||||
{atomic, ok} = ts_user:create_table(TableOpts),
|
||||
{atomic, ok} = ts_timeline:create_table(TableOpts),
|
||||
{atmoic, ok} = ts_entry:create_table(TableOpts),
|
||||
{atomic, ok} = ts_entry:create_table(TableOpts),
|
||||
ok.
|
||||
|
11
yaws.prod.conf
Normal file
11
yaws.prod.conf
Normal file
@ -0,0 +1,11 @@
|
||||
ebin_dir = /usr/lib/yaws/timestamper/ebin
|
||||
include_dir = /usr/lib/yaws/timestamper/include
|
||||
|
||||
runmod = timestamper
|
||||
|
||||
<server timestamper.jdbernard.com>
|
||||
port = 80
|
||||
listen = 0.0.0.0
|
||||
docroot = /usr/lib/yaws/timestamper/www
|
||||
appmods = ts_api
|
||||
</server>
|
Loading…
x
Reference in New Issue
Block a user