start-wekan.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/bash
  2. function wekan_repo_check(){
  3. git_remotes="$(git remote show 2>/dev/null)"
  4. res=""
  5. for i in $git_remotes; do
  6. res="$(git remote get-url $i | sed 's/.*wekan\/wekan.*/wekan\/wekan/')"
  7. if [[ "$res" == "wekan/wekan" ]]; then
  8. break
  9. fi
  10. done
  11. if [[ "$res" != "wekan/wekan" ]]; then
  12. echo "$PWD is not a wekan repository"
  13. exit;
  14. fi
  15. }
  16. # If you want to restart even on crash, uncomment while and done lines.
  17. #while true; do
  18. wekan_repo_check
  19. cd .build/bundle
  20. #export MONGO_URL='mongodb://127.0.0.1:27019/wekantest'
  21. #export MONGO_URL='mongodb://127.0.0.1:27019/wekan'
  22. export MONGO_URL='mongodb://127.0.0.1:27019/wekantest'
  23. # Production: https://example.com/wekan
  24. # Local: http://localhost:2000
  25. #export ipaddress=$(ifdata -pa eth0)
  26. export ROOT_URL='http://localhost:2000'
  27. # https://github.com/wekan/wekan/wiki/Troubleshooting-Mail
  28. # https://github.com/wekan/wekan-mongodb/blob/master/docker-compose.yml
  29. export MAIL_URL='smtp://user:pass@mailserver.example.com:25/'
  30. # This is local port where Wekan Node.js runs, same as below on Caddyfile settings.
  31. export WITH_API=true
  32. export KADIRA_OPTIONS_ENDPOINT=http://127.0.0.1:11011
  33. export PORT=2000
  34. #export LDAP_ENABLE=true
  35. node main.js
  36. # & >> ../../wekan.log
  37. cd ../..
  38. #done