install-demo.sh 785 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env sh
  2. set -eu
  3. # Listmonk demo setup using `docker-compose`.
  4. # See https://listmonk.app/docs/installation/ for detailed installation steps.
  5. check_dependencies() {
  6. if ! command -v curl > /dev/null; then
  7. echo "curl is not installed."
  8. exit 1
  9. fi
  10. if ! command -v docker > /dev/null; then
  11. echo "docker is not installed."
  12. exit 1
  13. fi
  14. if ! command -v docker-compose > /dev/null; then
  15. echo "docker-compose is not installed."
  16. exit 1
  17. fi
  18. }
  19. setup_containers() {
  20. curl -o docker-compose.yml https://raw.githubusercontent.com/knadh/listmonk/master/docker-compose.yml
  21. docker-compose up -d demo-db demo-app
  22. }
  23. show_output(){
  24. echo -e "\nListmonk is now up and running. Visit http://localhost:9000 in your browser.\n"
  25. }
  26. check_dependencies
  27. setup_containers
  28. show_output