-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (31 loc) · 880 Bytes
/
Makefile
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
# run with environment
SHELL := bash
NODE := iojs serve.js
start:
@$(NODE) serve.sh
.PHONY:start
dev:
@ $(NODE) serve.js
.PHONY:dev
docker: docker-build docker-db docker-klouds
.PHONY: docker
docker-build: Dockerfile
@docker build --tag=klouds .
.PHONY: docker-build
docker-klouds:
@docker start klouds 2>/dev/null || echo 'creating app container';
@docker run -d\
--link klouds-db:db\
-p 3000:8080\
-e JWT_KEY='abcd'\
-e STRIPE_SK='sk_test_Z34c2IRtyypD4EIQjdowKeLd'\
--name klouds klouds
.PHONY: docker-klouds
docker-db:
@docker rm -f klouds-db 2>/dev/null || echo 'creating mongo container';
@docker run -d -v $(pwd)/db:/data/db --name klouds-db mongo
.PHONY: docker-db
docker-clean:
@docker rm -f klouds 2>/dev/null || echo klouds container already off
@docker rm -f klouds-db 2>/dev/null || echo no klouds-db container already off
.PHONY: docker