diff options
author | rohmhatre | 2017-11-26 00:25:02 +0530 |
---|---|---|
committer | ankitjavalkar | 2018-01-04 11:37:20 +0530 |
commit | 0713c60a5ad4b71d4a2050d13cf30afaf37d935b (patch) | |
tree | c7cb207ab05a2197fd8bdd13d1d559345a2b29ef /docker/Makefile | |
parent | 6f2e29a067cbeaf88b8ea478bb7c24fe8772180a (diff) | |
download | online_test-0713c60a5ad4b71d4a2050d13cf30afaf37d935b.tar.gz online_test-0713c60a5ad4b71d4a2050d13cf30afaf37d935b.tar.bz2 online_test-0713c60a5ad4b71d4a2050d13cf30afaf37d935b.zip |
Added docker compose configuration
Diffstat (limited to 'docker/Makefile')
-rw-r--r-- | docker/Makefile | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/docker/Makefile b/docker/Makefile new file mode 100644 index 0000000..9119601 --- /dev/null +++ b/docker/Makefile @@ -0,0 +1,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 |