forked from umermansoor/microservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
28 lines (21 loc) · 887 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
# Microservices Project Make File
# author: umer mansoor
VIRTUALENV = $(shell which virtualenv)
clean: shutdown
rm -fr microservices.egg-info
rm -fr venv
venv:
$(VIRTUALENV) venv
install: clean venv
. venv/bin/activate; python setup.py install
. venv/bin/activate; python setup.py develop
launch: venv shutdown
. venv/bin/activate; python services/movies.py &
. venv/bin/activate; python services/showtimes.py &
. venv/bin/activate; python services/bookings.py &
. venv/bin/activate; python services/user.py &
shutdown:
ps -ef | grep "services/movies.py" | grep -v grep | awk '{print $$2}' | xargs kill
ps -ef | grep "services/showtimes.py" | grep -v grep | awk '{print $$2}' | xargs kill
ps -ef | grep "services/bookings.py" | grep -v grep | awk '{print $$2}' | xargs kill
ps -ef | grep "services/user.py" | grep -v grep | awk '{print $$2}' | xargs kill