start-wekan.sh 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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/wekan'
  21. # Production: https://example.com/wekan
  22. # Local: http://localhost:2000
  23. #export ipaddress=$(ifdata -pa eth0)
  24. export ROOT_URL='http://localhost:2000'
  25. # https://github.com/wekan/wekan/wiki/Troubleshooting-Mail
  26. # https://github.com/wekan/wekan-mongodb/blob/master/docker-compose.yml
  27. export MAIL_URL='smtp://user:pass@mailserver.example.com:25/'
  28. #export KADIRA_OPTIONS_ENDPOINT=http://127.0.0.1:11011
  29. # This is local port where Wekan Node.js runs, same as below on Caddyfile settings.
  30. export PORT=2000
  31. # Wekan Export Board works when WITH_API=true.
  32. # If you disable Wekan API with false, Export Board does not work.
  33. export WITH_API='true'
  34. #---------------------------------------------
  35. ## Optional: Integration with Matomo https://matomo.org that is installed to your server
  36. ## The address of the server where Matomo is hosted:
  37. ##export MATOMO_ADDRESS=https://example.com/matomo
  38. #export MATOMO_ADDRESS=
  39. ## The value of the site ID given in Matomo server for Wekan
  40. # Example: export MATOMO_SITE_ID=123456789
  41. #export MATOMO_SITE_ID=''
  42. ## The option do not track which enables users to not be tracked by matomo"
  43. #Example: export MATOMO_DO_NOT_TRACK=false
  44. #export MATOMO_DO_NOT_TRACK=true
  45. ## The option that allows matomo to retrieve the username:
  46. # Example: export MATOMO_WITH_USERNAME=true
  47. #export MATOMO_WITH_USERNAME='false'
  48. # Enable browser policy and allow one trusted URL that can have iframe that has Wekan embedded inside.
  49. # Setting this to false is not recommended, it also disables all other browser policy protections
  50. # and allows all iframing etc. See wekan/server/policy.js
  51. # Default value: true
  52. export BROWSER_POLICY_ENABLED=true
  53. # When browser policy is enabled, HTML code at this Trusted URL can have iframe that embeds Wekan inside.
  54. # Example: export TRUSTED_URL=http://example.com
  55. export TRUSTED_URL=''
  56. # What to send to Outgoing Webhook, or leave out. Example, that includes all that are default: cardId,listId,oldListId,boardId,comment,user,card,commentId .
  57. # Example: export WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,commentId
  58. export WEBHOOKS_ATTRIBUTES=''
  59. #---------------------------------------------
  60. # OAuth2 docs: https://github.com/wekan/wekan/wiki/OAuth2
  61. # OAuth2 Client ID, for example from Rocket.Chat. Example: abcde12345
  62. # example: export OAUTH2_CLIENT_ID=abcde12345
  63. #export OAUTH2_CLIENT_ID=''
  64. # OAuth2 Secret, for example from Rocket.Chat: Example: 54321abcde
  65. # example: export OAUTH2_SECRET=54321abcde
  66. #export OAUTH2_SECRET=''
  67. # OAuth2 Server URL, for example Rocket.Chat. Example: https://chat.example.com
  68. # example: export OAUTH2_SERVER_URL=https://chat.example.com
  69. #export OAUTH2_SERVER_URL=''
  70. # OAuth2 Authorization Endpoint. Example: /oauth/authorize
  71. # example: export OAUTH2_AUTH_ENDPOINT=/oauth/authorize
  72. #export OAUTH2_AUTH_ENDPOINT=''
  73. # OAuth2 Userinfo Endpoint. Example: /oauth/userinfo
  74. # example: export OAUTH2_USERINFO_ENDPOINT=/oauth/userinfo
  75. #export OAUTH2_USERINFO_ENDPOINT=''
  76. # OAuth2 Token Endpoint. Example: /oauth/token
  77. # example: export OAUTH2_TOKEN_ENDPOINT=/oauth/token
  78. #export OAUTH2_TOKEN_ENDPOINT=''
  79. #---------------------------------------------
  80. # LDAP_ENABLE : Enable or not the connection by the LDAP
  81. # example : export LDAP_ENABLE=true
  82. #export LDAP_ENABLE=false
  83. # LDAP_PORT : The port of the LDAP server
  84. # example : export LDAP_PORT=389
  85. #export LDAP_PORT=389
  86. # LDAP_HOST : The host server for the LDAP server
  87. # example : export LDAP_HOST=localhost
  88. #export LDAP_HOST=
  89. # LDAP_BASEDN : The base DN for the LDAP Tree
  90. # example : export LDAP_BASEDN=ou=user,dc=example,dc=org
  91. #export LDAP_BASEDN=
  92. # LDAP_LOGIN_FALLBACK : Fallback on the default authentication method
  93. # example : export LDAP_LOGIN_FALLBACK=true
  94. #export LDAP_LOGIN_FALLBACK=false
  95. # LDAP_RECONNECT : Reconnect to the server if the connection is lost
  96. # example : export LDAP_RECONNECT=false
  97. #export LDAP_RECONNECT=true
  98. # LDAP_TIMEOUT : Overall timeout, in milliseconds
  99. # example : export LDAP_TIMEOUT=12345
  100. #export LDAP_TIMEOUT=10000
  101. # LDAP_IDLE_TIMEOUT : Specifies the timeout for idle LDAP connections in milliseconds
  102. # example : export LDAP_IDLE_TIMEOUT=12345
  103. #export LDAP_IDLE_TIMEOUT=10000
  104. # LDAP_CONNECT_TIMEOUT : Connection timeout, in milliseconds
  105. # example : export LDAP_CONNECT_TIMEOUT=12345
  106. #export LDAP_CONNECT_TIMEOUT=10000
  107. # LDAP_AUTHENTIFICATION : If the LDAP needs a user account to search
  108. # example : export LDAP_AUTHENTIFICATION=true
  109. #export LDAP_AUTHENTIFICATION=false
  110. # LDAP_AUTHENTIFICATION_USERDN : The search user DN
  111. # example : export LDAP_AUTHENTIFICATION_USERDN=cn=admin,dc=example,dc=org
  112. #export LDAP_AUTHENTIFICATION_USERDN=
  113. # LDAP_AUTHENTIFICATION_PASSWORD : The password for the search user
  114. # example : AUTHENTIFICATION_PASSWORD=admin
  115. #export LDAP_AUTHENTIFICATION_PASSWORD=
  116. # LDAP_LOG_ENABLED : Enable logs for the module
  117. # example : export LDAP_LOG_ENABLED=true
  118. #export LDAP_LOG_ENABLED=false
  119. # LDAP_BACKGROUND_SYNC : If the sync of the users should be done in the background
  120. # example : export LDAP_BACKGROUND_SYNC=true
  121. #export LDAP_BACKGROUND_SYNC=false
  122. # LDAP_BACKGROUND_SYNC_INTERVAL : At which interval does the background task sync in milliseconds
  123. # example : export LDAP_BACKGROUND_SYNC_INTERVAL=12345
  124. #export LDAP_BACKGROUND_SYNC_INTERVAL=100
  125. # LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED :
  126. # example : export LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED=true
  127. #export LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED=false
  128. # LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS :
  129. # example : export LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS=true
  130. #export LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS=false
  131. # LDAP_ENCRYPTION : If using LDAPS
  132. # example : export LDAP_ENCRYPTION=ssl
  133. #export LDAP_ENCRYPTION=false
  134. # LDAP_CA_CERT : The certification for the LDAPS server. Certificate needs to be included in this docker-compose.yml file.
  135. # example : export LDAP_CA_CERT=-----BEGIN CERTIFICATE-----MIIE+zCCA+OgAwIBAgIkAhwR/6TVLmdRY6hHxvUFWc0+Enmu/Hu6cj+G2FIdAgIC...-----END CERTIFICATE-----
  136. #export LDAP_CA_CERT=
  137. # LDAP_REJECT_UNAUTHORIZED : Reject Unauthorized Certificate
  138. # example : export LDAP_REJECT_UNAUTHORIZED=true
  139. #export LDAP_REJECT_UNAUTHORIZED=false
  140. # LDAP_USER_SEARCH_FILTER : Optional extra LDAP filters. Don't forget the outmost enclosing parentheses if needed
  141. # example : export LDAP_USER_SEARCH_FILTER=
  142. #export LDAP_USER_SEARCH_FILTER=
  143. # LDAP_USER_SEARCH_SCOPE : base (search only in the provided DN), one (search only in the provided DN and one level deep), or sub (search the whole subtree)
  144. # example : export LDAP_USER_SEARCH_SCOPE=one
  145. #export LDAP_USER_SEARCH_SCOPE=
  146. # LDAP_USER_SEARCH_FIELD : Which field is used to find the user
  147. # example : export LDAP_USER_SEARCH_FIELD=uid
  148. #export LDAP_USER_SEARCH_FIELD=
  149. # LDAP_SEARCH_PAGE_SIZE : Used for pagination (0=unlimited)
  150. # example : export LDAP_SEARCH_PAGE_SIZE=12345
  151. #export LDAP_SEARCH_PAGE_SIZE=0
  152. # LDAP_SEARCH_SIZE_LIMIT : The limit number of entries (0=unlimited)
  153. # example : export LDAP_SEARCH_SIZE_LIMIT=12345
  154. #export LDAP_SEARCH_SIZE_LIMIT=0
  155. # LDAP_GROUP_FILTER_ENABLE : Enable group filtering
  156. # example : export LDAP_GROUP_FILTER_ENABLE=true
  157. #export LDAP_GROUP_FILTER_ENABLE=false
  158. # LDAP_GROUP_FILTER_OBJECTCLASS : The object class for filtering
  159. # example : export LDAP_GROUP_FILTER_OBJECTCLASS=group
  160. #export LDAP_GROUP_FILTER_OBJECTCLASS=
  161. # LDAP_GROUP_FILTER_GROUP_ID_ATTRIBUTE :
  162. # example :
  163. #export LDAP_GROUP_FILTER_GROUP_ID_ATTRIBUTE=
  164. # LDAP_GROUP_FILTER_GROUP_MEMBER_ATTRIBUTE :
  165. # example :
  166. #export LDAP_GROUP_FILTER_GROUP_MEMBER_ATTRIBUTE=
  167. # LDAP_GROUP_FILTER_GROUP_MEMBER_FORMAT :
  168. # example :
  169. #export LDAP_GROUP_FILTER_GROUP_MEMBER_FORMAT=
  170. # LDAP_GROUP_FILTER_GROUP_NAME :
  171. # example :
  172. #export LDAP_GROUP_FILTER_GROUP_NAME=
  173. # LDAP_UNIQUE_IDENTIFIER_FIELD : This field is sometimes class GUID (Globally Unique Identifier)
  174. # example : export LDAP_UNIQUE_IDENTIFIER_FIELD=guid
  175. #export LDAP_UNIQUE_IDENTIFIER_FIELD=
  176. # LDAP_UTF8_NAMES_SLUGIFY : Convert the username to utf8
  177. # example : export LDAP_UTF8_NAMES_SLUGIFY=false
  178. #export LDAP_UTF8_NAMES_SLUGIFY=true
  179. # LDAP_USERNAME_FIELD : Which field contains the ldap username
  180. # example : export LDAP_USERNAME_FIELD=username
  181. #export LDAP_USERNAME_FIELD=
  182. # LDAP_FULLNAME_FIELD : Which field contains the ldap fullname
  183. # example : export LDAP_FULLNAME_FIELD=fullname
  184. #export LDAP_FULLNAME_FIELD=
  185. # LDAP_MERGE_EXISTING_USERS :
  186. # example : export LDAP_MERGE_EXISTING_USERS=true
  187. #export LDAP_MERGE_EXISTING_USERS=false
  188. # LDAP_SYNC_USER_DATA :
  189. # example : export LDAP_SYNC_USER_DATA=true
  190. #export LDAP_SYNC_USER_DATA=false
  191. # LDAP_SYNC_USER_DATA_FIELDMAP :
  192. # example : export LDAP_SYNC_USER_DATA_FIELDMAP={"cn":"name", "mail":"email"}
  193. #export LDAP_SYNC_USER_DATA_FIELDMAP=
  194. # LDAP_SYNC_GROUP_ROLES :
  195. # example :
  196. #export LDAP_SYNC_GROUP_ROLES=
  197. # LDAP_DEFAULT_DOMAIN : The default domain of the ldap it is used to create email if the field is not map correctly with the LDAP_SYNC_USER_DATA_FIELDMAP
  198. # example :
  199. #export LDAP_DEFAULT_DOMAIN=
  200. node main.js
  201. # & >> ../../wekan.log
  202. cd ../..
  203. #done