start-wekan.sh 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. #!/bin/bash
  2. # If you want to restart even on crash, uncomment while and done lines.
  3. #while true; do
  4. cd .build/bundle
  5. #---------------------------------------------
  6. # Debug OIDC OAuth2 etc.
  7. #export DEBUG=true
  8. #---------------------------------------------
  9. export MONGO_URL='mongodb://127.0.0.1:27018/wekan'
  10. #---------------------------------------------
  11. # Production: https://example.com/wekan
  12. # Local: http://localhost:2000
  13. #export ipaddress=$(ifdata -pa eth0)
  14. export ROOT_URL='http://localhost:2000'
  15. #---------------------------------------------
  16. # https://github.com/wekan/wekan/wiki/Troubleshooting-Mail
  17. # https://github.com/wekan/wekan-mongodb/blob/master/docker-compose.yml
  18. export MAIL_URL='smtp://user:pass@mailserver.example.com:25/'
  19. #---------------------------------------------
  20. #export KADIRA_OPTIONS_ENDPOINT=http://127.0.0.1:11011
  21. #---------------------------------------------
  22. # This is local port where Wekan Node.js runs, same as below on Caddyfile settings.
  23. export PORT=2000
  24. #---------------------------------------------
  25. # Wekan Export Board works when WITH_API=true.
  26. # If you disable Wekan API with false, Export Board does not work.
  27. export WITH_API='true'
  28. #---------------------------------------------------------------
  29. # ==== PASSWORD BRUTE FORCE PROTECTION ====
  30. #https://atmospherejs.com/lucasantoniassi/accounts-lockout
  31. #Defaults below. Uncomment to change. wekan/server/accounts-lockout.js
  32. #export ACCOUNTS_LOCKOUT_KNOWN_USERS_FAILURES_BEFORE=3
  33. #export ACCOUNTS_LOCKOUT_KNOWN_USERS_PERIOD=60
  34. #export ACCOUNTS_LOCKOUT_KNOWN_USERS_FAILURE_WINDOW=15
  35. #export ACCOUNTS_LOCKOUT_UNKNOWN_USERS_FAILURES_BERORE=3
  36. #export ACCOUNTS_LOCKOUT_UNKNOWN_USERS_LOCKOUT_PERIOD=60
  37. #export ACCOUNTS_LOCKOUT_UNKNOWN_USERS_FAILURE_WINDOW=15
  38. #---------------------------------------------
  39. # CORS: Set Access-Control-Allow-Origin header. Example: *
  40. #export CORS=*
  41. # To enable the Set Access-Control-Allow-Headers header. "Authorization,Content-Type" is required for cross-origin use of the API.
  42. #export CORS_ALLOW_HEADERS=Authorization,Content-Type
  43. # To enable the Set Access-Control-Expose-Headers header. This is not needed for typical CORS situations. Example: *
  44. #export CORS_EXPOSE_HEADERS=*
  45. #---------------------------------------------
  46. ## Optional: Integration with Matomo https://matomo.org that is installed to your server
  47. ## The address of the server where Matomo is hosted:
  48. ##export MATOMO_ADDRESS=https://example.com/matomo
  49. #export MATOMO_ADDRESS=
  50. ## The value of the site ID given in Matomo server for Wekan
  51. # Example: export MATOMO_SITE_ID=123456789
  52. #export MATOMO_SITE_ID=''
  53. ## The option do not track which enables users to not be tracked by matomo"
  54. #Example: export MATOMO_DO_NOT_TRACK=false
  55. #export MATOMO_DO_NOT_TRACK=true
  56. ## The option that allows matomo to retrieve the username:
  57. # Example: export MATOMO_WITH_USERNAME=true
  58. #export MATOMO_WITH_USERNAME='false'
  59. # Enable browser policy and allow one trusted URL that can have iframe that has Wekan embedded inside.
  60. # Setting this to false is not recommended, it also disables all other browser policy protections
  61. # and allows all iframing etc. See wekan/server/policy.js
  62. # Default value: true
  63. export BROWSER_POLICY_ENABLED=true
  64. # When browser policy is enabled, HTML code at this Trusted URL can have iframe that embeds Wekan inside.
  65. # Example: export TRUSTED_URL=http://example.com
  66. export TRUSTED_URL=''
  67. # What to send to Outgoing Webhook, or leave out. Example, that includes all that are default: cardId,listId,oldListId,boardId,comment,user,card,commentId .
  68. # Example: export WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,commentId
  69. export WEBHOOKS_ATTRIBUTES=''
  70. #---------------------------------------------
  71. # ==== OAUTH2 AZURE ====
  72. # https://github.com/wekan/wekan/wiki/Azure
  73. # 1) Register the application with Azure. Make sure you capture
  74. # the application ID as well as generate a secret key.
  75. # 2) Configure the environment variables. This differs slightly
  76. # by installation type, but make sure you have the following:
  77. #export OAUTH2_ENABLED=true
  78. # OAuth2 docs: https://github.com/wekan/wekan/wiki/OAuth2
  79. # OAuth2 login style: popup or redirect.
  80. #export OAUTH2_LOGIN_STYLE=redirect
  81. # Application GUID captured during app registration:
  82. #export OAUTH2_CLIENT_ID=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
  83. # Secret key generated during app registration:
  84. #export OAUTH2_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  85. #export OAUTH2_SERVER_URL=https://login.microsoftonline.com/
  86. #export OAUTH2_AUTH_ENDPOINT=/oauth2/v2.0/authorize
  87. #export OAUTH2_USERINFO_ENDPOINT=https://graph.microsoft.com/oidc/userinfo
  88. #export OAUTH2_TOKEN_ENDPOINT=/oauth2/v2.0/token
  89. # The claim name you want to map to the unique ID field:
  90. #export OAUTH2_ID_MAP=email
  91. # The claim name you want to map to the username field:
  92. #export OAUTH2_USERNAME_MAP=email
  93. # The claim name you want to map to the full name field:
  94. #export OAUTH2_FULLNAME_MAP=name
  95. # The claim name you want to map to the email field:
  96. #export OAUTH2_EMAIL_MAP=email
  97. #-----------------------------------------------------------------
  98. # ==== OAUTH2 KEYCLOAK ====
  99. # https://github.com/wekan/wekan/wiki/Keycloak <== MAPPING INFO, REQUIRED
  100. #export OAUTH2_ENABLED=true
  101. # OAuth2 login style: popup or redirect.
  102. #export OAUTH2_LOGIN_STYLE=redirect
  103. #export OAUTH2_CLIENT_ID=<Keycloak create Client ID>
  104. #export OAUTH2_SERVER_URL=<Keycloak server name>/auth
  105. #export OAUTH2_AUTH_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/auth
  106. #export OAUTH2_USERINFO_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/userinfo
  107. #export OAUTH2_TOKEN_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/token
  108. #export OAUTH2_SECRET=<keycloak client secret>
  109. #-----------------------------------------------------------------
  110. # ==== OAUTH2 DOORKEEPER ====
  111. # OAuth2 docs: https://github.com/wekan/wekan/wiki/OAuth2
  112. # https://github.com/wekan/wekan/issues/1874
  113. # https://github.com/wekan/wekan/wiki/OAuth2
  114. # Enable the OAuth2 connection
  115. #export OAUTH2_ENABLED=true
  116. # OAuth2 login style: popup or redirect.
  117. #export OAUTH2_LOGIN_STYLE=redirect
  118. # OAuth2 Client ID.
  119. #export OAUTH2_CLIENT_ID=abcde12345
  120. # OAuth2 Secret.
  121. #export OAUTH2_SECRET=54321abcde
  122. # OAuth2 Server URL.
  123. #export OAUTH2_SERVER_URL=https://chat.example.com
  124. # OAuth2 Authorization Endpoint.
  125. #export OAUTH2_AUTH_ENDPOINT=/oauth/authorize
  126. # OAuth2 Userinfo Endpoint.
  127. #export OAUTH2_USERINFO_ENDPOINT=/oauth/userinfo
  128. # OAuth2 Token Endpoint.
  129. #export OAUTH2_TOKEN_ENDPOINT=/oauth/token
  130. # OAUTH2 ID Token Whitelist Fields.
  131. #export OAUTH2_ID_TOKEN_WHITELIST_FIELDS=[]
  132. # OAUTH2 Request Permissions.
  133. #export OAUTH2_REQUEST_PERMISSIONS='openid profile email'
  134. # OAuth2 ID Mapping
  135. #export OAUTH2_ID_MAP=
  136. # OAuth2 Username Mapping
  137. #export OAUTH2_USERNAME_MAP=
  138. # OAuth2 Fullname Mapping
  139. #export OAUTH2_FULLNAME_MAP=
  140. # OAuth2 Email Mapping
  141. #export OAUTH2_EMAIL_MAP=
  142. #---------------------------------------------
  143. # LDAP_ENABLE : Enable or not the connection by the LDAP
  144. # example : export LDAP_ENABLE=true
  145. #export LDAP_ENABLE=false
  146. # LDAP_PORT : The port of the LDAP server
  147. # example : export LDAP_PORT=389
  148. #export LDAP_PORT=389
  149. # LDAP_HOST : The host server for the LDAP server
  150. # example : export LDAP_HOST=localhost
  151. #export LDAP_HOST=
  152. # LDAP_BASEDN : The base DN for the LDAP Tree
  153. # example : export LDAP_BASEDN=ou=user,dc=example,dc=org
  154. #export LDAP_BASEDN=
  155. # LDAP_LOGIN_FALLBACK : Fallback on the default authentication method
  156. # example : export LDAP_LOGIN_FALLBACK=true
  157. #export LDAP_LOGIN_FALLBACK=false
  158. # LDAP_RECONNECT : Reconnect to the server if the connection is lost
  159. # example : export LDAP_RECONNECT=false
  160. #export LDAP_RECONNECT=true
  161. # LDAP_TIMEOUT : Overall timeout, in milliseconds
  162. # example : export LDAP_TIMEOUT=12345
  163. #export LDAP_TIMEOUT=10000
  164. # LDAP_IDLE_TIMEOUT : Specifies the timeout for idle LDAP connections in milliseconds
  165. # example : export LDAP_IDLE_TIMEOUT=12345
  166. #export LDAP_IDLE_TIMEOUT=10000
  167. # LDAP_CONNECT_TIMEOUT : Connection timeout, in milliseconds
  168. # example : export LDAP_CONNECT_TIMEOUT=12345
  169. #export LDAP_CONNECT_TIMEOUT=10000
  170. # LDAP_AUTHENTIFICATION : If the LDAP needs a user account to search
  171. # example : export LDAP_AUTHENTIFICATION=true
  172. #export LDAP_AUTHENTIFICATION=false
  173. # LDAP_AUTHENTIFICATION_USERDN : The search user DN
  174. # example : export LDAP_AUTHENTIFICATION_USERDN=cn=admin,dc=example,dc=org
  175. #export LDAP_AUTHENTIFICATION_USERDN=
  176. # LDAP_AUTHENTIFICATION_PASSWORD : The password for the search user
  177. # example : AUTHENTIFICATION_PASSWORD=admin
  178. #export LDAP_AUTHENTIFICATION_PASSWORD=
  179. # LDAP_LOG_ENABLED : Enable logs for the module
  180. # example : export LDAP_LOG_ENABLED=true
  181. #export LDAP_LOG_ENABLED=false
  182. # LDAP_BACKGROUND_SYNC : If the sync of the users should be done in the background
  183. # example : export LDAP_BACKGROUND_SYNC=true
  184. #export LDAP_BACKGROUND_SYNC=false
  185. # LDAP_BACKGROUND_SYNC_INTERVAL : At which interval does the background task sync in milliseconds
  186. # example : export LDAP_BACKGROUND_SYNC_INTERVAL=12345
  187. #export LDAP_BACKGROUND_SYNC_INTERVAL=100
  188. # LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED :
  189. # example : export LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED=true
  190. #export LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED=false
  191. # LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS :
  192. # example : export LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS=true
  193. #export LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS=false
  194. # LDAP_ENCRYPTION : If using LDAPS
  195. # example : export LDAP_ENCRYPTION=ssl
  196. #export LDAP_ENCRYPTION=false
  197. # LDAP_CA_CERT : The certification for the LDAPS server. Certificate needs to be included in this docker-compose.yml file.
  198. # example : export LDAP_CA_CERT=-----BEGIN CERTIFICATE-----MIIE+zCCA+OgAwIBAgIkAhwR/6TVLmdRY6hHxvUFWc0+Enmu/Hu6cj+G2FIdAgIC...-----END CERTIFICATE-----
  199. #export LDAP_CA_CERT=
  200. # LDAP_REJECT_UNAUTHORIZED : Reject Unauthorized Certificate
  201. # example : export LDAP_REJECT_UNAUTHORIZED=true
  202. #export LDAP_REJECT_UNAUTHORIZED=false
  203. # Option to login to the LDAP server with the user's own username and password, instead of an administrator key. Default: false (use administrator key).
  204. #export LDAP_USER_AUTHENTICATION=true
  205. # LDAP_USER_SEARCH_FILTER : Optional extra LDAP filters. Don't forget the outmost enclosing parentheses if needed
  206. # example : export LDAP_USER_SEARCH_FILTER=
  207. #export LDAP_USER_SEARCH_FILTER=
  208. # 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)
  209. # example : export LDAP_USER_SEARCH_SCOPE=one
  210. #export LDAP_USER_SEARCH_SCOPE=
  211. # LDAP_USER_SEARCH_FIELD : Which field is used to find the user
  212. # example : export LDAP_USER_SEARCH_FIELD=uid
  213. #export LDAP_USER_SEARCH_FIELD=
  214. # LDAP_SEARCH_PAGE_SIZE : Used for pagination (0=unlimited)
  215. # example : export LDAP_SEARCH_PAGE_SIZE=12345
  216. #export LDAP_SEARCH_PAGE_SIZE=0
  217. # LDAP_SEARCH_SIZE_LIMIT : The limit number of entries (0=unlimited)
  218. # example : export LDAP_SEARCH_SIZE_LIMIT=12345
  219. #export LDAP_SEARCH_SIZE_LIMIT=0
  220. # LDAP_GROUP_FILTER_ENABLE : Enable group filtering
  221. # example : export LDAP_GROUP_FILTER_ENABLE=true
  222. #export LDAP_GROUP_FILTER_ENABLE=false
  223. # LDAP_GROUP_FILTER_OBJECTCLASS : The object class for filtering
  224. # example : export LDAP_GROUP_FILTER_OBJECTCLASS=group
  225. #export LDAP_GROUP_FILTER_OBJECTCLASS=
  226. # LDAP_GROUP_FILTER_GROUP_ID_ATTRIBUTE :
  227. # example :
  228. #export LDAP_GROUP_FILTER_GROUP_ID_ATTRIBUTE=
  229. # LDAP_GROUP_FILTER_GROUP_MEMBER_ATTRIBUTE :
  230. # example :
  231. #export LDAP_GROUP_FILTER_GROUP_MEMBER_ATTRIBUTE=
  232. # LDAP_GROUP_FILTER_GROUP_MEMBER_FORMAT :
  233. # example :
  234. #export LDAP_GROUP_FILTER_GROUP_MEMBER_FORMAT=
  235. # LDAP_GROUP_FILTER_GROUP_NAME :
  236. # example :
  237. #export LDAP_GROUP_FILTER_GROUP_NAME=
  238. # LDAP_UNIQUE_IDENTIFIER_FIELD : This field is sometimes class GUID (Globally Unique Identifier)
  239. # example : export LDAP_UNIQUE_IDENTIFIER_FIELD=guid
  240. #export LDAP_UNIQUE_IDENTIFIER_FIELD=
  241. # LDAP_UTF8_NAMES_SLUGIFY : Convert the username to utf8
  242. # example : export LDAP_UTF8_NAMES_SLUGIFY=false
  243. #export LDAP_UTF8_NAMES_SLUGIFY=true
  244. # LDAP_USERNAME_FIELD : Which field contains the ldap username
  245. # example : export LDAP_USERNAME_FIELD=username
  246. #export LDAP_USERNAME_FIELD=
  247. # LDAP_FULLNAME_FIELD : Which field contains the ldap fullname
  248. # example : export LDAP_FULLNAME_FIELD=fullname
  249. #export LDAP_FULLNAME_FIELD=
  250. # LDAP_MERGE_EXISTING_USERS :
  251. # example : export LDAP_MERGE_EXISTING_USERS=true
  252. #export LDAP_MERGE_EXISTING_USERS=false
  253. # LDAP_EMAIL_MATCH_ENABLE : allow existing account matching by e-mail address when username does not match
  254. # example: LDAP_EMAIL_MATCH_ENABLE=true
  255. #export LDAP_EMAIL_MATCH_ENABLE=false
  256. # LDAP_EMAIL_MATCH_REQUIRE : require existing account matching by e-mail address when username does match
  257. # example: LDAP_EMAIL_MATCH_REQUIRE=true
  258. #export LDAP_EMAIL_MATCH_REQUIRE=false
  259. # LDAP_EMAIL_MATCH_VERIFIED : require existing account email address to be verified for matching
  260. # example: LDAP_EMAIL_MATCH_VERIFIED=true
  261. #export LDAP_EMAIL_MATCH_VERIFIED=false
  262. # LDAP_EMAIL_FIELD : which field contains the LDAP e-mail address
  263. # example: LDAP_EMAIL_FIELD=mail
  264. #export LDAP_EMAIL_FIELD=
  265. # LDAP_SYNC_USER_DATA :
  266. # example : export LDAP_SYNC_USER_DATA=true
  267. #export LDAP_SYNC_USER_DATA=false
  268. # LDAP_SYNC_USER_DATA_FIELDMAP :
  269. # example : export LDAP_SYNC_USER_DATA_FIELDMAP={"cn":"name", "mail":"email"}
  270. #export LDAP_SYNC_USER_DATA_FIELDMAP=
  271. # LDAP_SYNC_GROUP_ROLES :
  272. # example :
  273. #export LDAP_SYNC_GROUP_ROLES=
  274. # 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
  275. # example :
  276. #export LDAP_DEFAULT_DOMAIN=
  277. # Enable/Disable syncing of admin status based on ldap groups:
  278. #export LDAP_SYNC_ADMIN_STATUS=true
  279. # Comma separated list of admin group names to sync.
  280. #export LDAP_SYNC_ADMIN_GROUPS=group1,group2
  281. #---------------------------------------------------------------------
  282. # Login to LDAP automatically with HTTP header.
  283. # In below example for siteminder, at right side of = is header name.
  284. #export HEADER_LOGIN_ID=HEADERUID
  285. #export HEADER_LOGIN_FIRSTNAME=HEADERFIRSTNAME
  286. #export HEADER_LOGIN_LASTNAME=HEADERLASTNAME
  287. #export HEADER_LOGIN_EMAIL=HEADEREMAILADDRESS
  288. #---------------------------------------------------------------------
  289. # LOGOUT_WITH_TIMER : Enables or not the option logout with timer
  290. # example : LOGOUT_WITH_TIMER=true
  291. #export LOGOUT_WITH_TIMER=
  292. # LOGOUT_IN : The number of days
  293. # example : LOGOUT_IN=1
  294. #export LOGOUT_IN=
  295. #export LOGOUT_ON_HOURS=
  296. # LOGOUT_ON_MINUTES : The number of minutes
  297. # example : LOGOUT_ON_MINUTES=55
  298. #export LOGOUT_ON_MINUTES=
  299. node main.js
  300. # & >> ../../wekan.log
  301. cd ../..
  302. #done