start-wekan.sh 11 KB

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