Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # get information about webexpeinstance
  2. WEBEXPE_RUN=$(docker ps | grep webexpeinstance)
  3. WEBEXPE_STOP=$(docker ps -a | grep webexpeinstance)
  4. build:
  5. @echo "----------------------------------------------------------------"
  6. @echo "Update of djangowebexpe image"
  7. @echo "----------------------------------------------------------------"
  8. docker build --no-cache . --tag djangowebexpe
  9. @echo "----------------------------------------------------------------"
  10. @echo "Image is now build you can run instance using 'make run'
  11. @echo "----------------------------------------------------------------"
  12. run:
  13. @echo "----------------------------------------------------------------"
  14. @echo "Process to run new instance"
  15. @echo "----------------------------------------------------------------"
  16. docker run -p 8000:8000 -it -d --name webexpeinstance djangowebexpe
  17. @echo "----------------------------------------------------------------"
  18. @echo "Your docker instance is now launched with name 'webexpeinstance'"
  19. @echo "Your website is now accessible at http://localhost:8000"
  20. @echo "----------------------------------------------------------------"
  21. stop:
  22. @echo "----------------------------------------------------------------"
  23. @echo "Process to stop current instance"
  24. @echo "----------------------------------------------------------------"
  25. docker stop webexpeinstance
  26. @echo "----------------------------------------------------------------"
  27. @echo "App is now stopped"
  28. @echo "----------------------------------------------------------------"
  29. remove:
  30. @echo "----------------------------------------------------------------"
  31. @echo "Process to stop current instance"
  32. @echo "----------------------------------------------------------------"
  33. docker stop webexpeinstance
  34. docker rm webexpeinstance
  35. @echo "----------------------------------------------------------------"
  36. @echo "App is now stopped and removed"
  37. @echo "----------------------------------------------------------------"
  38. deploy: build run