summaryrefslogtreecommitdiff
path: root/docker/Makefile
blob: 9119601382c15e765ff7889780a1fe1f12a96b22 (plain)
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
53
54
55
56
57
58
59
60
61
help:
	@echo "Docker Compose Help for Deploying Yaksh interface"
	@echo  "-----------------------\n"
	@echo "Clone yaksh online interface from github :"
	@echo "    make clone"
	@echo ""
	@echo "Build docker images:"
	@echo "    make build"
	@echo ""
	@echo "To run containers:"
	@echo "    make start"
	@echo ""
	@echo "You need to create super a user to work with yaksh:"
	@echo "    make createsuperuser"
	@echo ""
	@echo "Now Your interface is ready. You can access it using browser just go to http://localhost:8000"
	@echo ""
	@echo "Really, really start over:"
	@echo "    make clean"
	@echo ""
	@echo "other utilities:restart,tail,status"

begin: migrate fixtures start

clone:
	@/bin/bash clone-yaksh.sh

start:
	@docker-compose up -d

stop:
	@docker-compose stop

status:
	@docker-compose ps

restart: stop start

clean: stop
	@docker-compose rm --force

build:
	@docker-compose build --no-cache 
	@docker pull mariadb:10.2 

createsuperuser: migrate superuser

migrate:
	@docker exec -it yaksh_django python3 manage.py makemigrations
	@docker exec -it yaksh_django python3 manage.py migrate

superuser:
	@docker exec -it yaksh_django python3 manage.py createsuperuser
	@docker exec -it yaksh_django python3 manage.py add_group
	@docker exec -it yaksh_django python3 manage.py collectstatic
	@echo "You can access it using browser, just go to http://localhost:8000"

tail:
	@docker-compose logs -f

.PHONY: start stop status restart clean build migrate tail clone superuser createsuperuser