-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
53 lines (40 loc) · 1.16 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
SHELL := /bin/bash
export PIP_NO_CACHE_DIR = off
.PHONY: local
local:
@heroku local
.PHONY: deps
deps: redis pipenv
.PHONY: pip
pip:
@pipenv install --python 3.9 --dev --verbose
.PHONY: pipenv
pipenv:
# activate pipenv if not active, otherwise do nothing
@if [[ `pip -V` == *"virtualenvs"* ]]; then echo "pipenv shell active already :)"; else pipenv shell; echo "pipenv shell activated";fi
.PHONY: redis
redis:
# create a new docker container with the redis image if one is not already running on port 6379, otherwise do nothing
@if [[ -z "`docker ps | grep 0.0.0.0:6379`" ]]; then docker run -p 6379:6379 -d redis; echo "redis docker container now running"; else echo "redis docker container already running:)";fi
.PHONY: deploy
deploy:
@git push heroku master
.PHONY: force_deploy
force_deploy:
@git push -f heroku master
.PHONY: makemigrationslocal
makemigrationslocal:
@export $(xargs < .env)
@python manage.py makemigrations
.PHONY: migratelocal
migratelocal:
@export $(xargs < .env)
@python manage.py migrate
.PHONY: dbshell
dbshell:
@export $(xargs < .env)
@python manage.py dbshell
.PHONY: shell
shell:
@export $(xargs < .env)
@python manage.py shell