start-wekan.sh 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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. # ==== RICH TEXT EDITOR IN CARD COMMENTS ====
  40. # https://github.com/wekan/wekan/pull/2560
  41. export RICHER_CARD_COMMENT_EDITOR=true
  42. #---------------------------------------------------------------
  43. # ==== Allow to shrink attached/pasted image ====
  44. # https://github.com/wekan/wekan/pull/2544
  45. #export MAX_IMAGE_PIXEL=1024
  46. #export IMAGE_COMPRESS_RATIO=80
  47. #---------------------------------------------------------------
  48. # ==== BIGEVENTS DUE ETC NOTIFICATIONS =====
  49. # https://github.com/wekan/wekan/pull/2541
  50. # Introduced a system env var BIGEVENTS_PATTERN default as "due",
  51. # so any activityType matches the pattern, system will send out
  52. # notifications to all board members no matter they are watching
  53. # or tracking the board or not. Owner of the wekan server can
  54. # disable the feature by setting this variable to "NONE" or
  55. # change the pattern to any valid regex. i.e. '|' delimited
  56. # activityType names.
  57. # a) Default
  58. #export BIGEVENTS_PATTERN=due
  59. # b) All
  60. #export BIGEVENTS_PATTERN=received|start|due|end
  61. # c) Disabled
  62. #export BIGEVENTS_PATTERN=NONE
  63. #---------------------------------------------------------------
  64. # ==== EMAIL DUE DATE NOTIFICATION =====
  65. # https://github.com/wekan/wekan/pull/2536
  66. # System timelines will be showing any user modification for
  67. # dueat startat endat receivedat, also notification to
  68. # the watchers and if any card is due, about due or past due.
  69. #
  70. # Notify due days, default 2 days before and after. 0 = due notifications disabled. Default: 2
  71. #export NOTIFY_DUE_DAYS_BEFORE_AND_AFTER=2
  72. #
  73. # Notify due at hour of day. Default every morning at 8am. Can be 0-23.
  74. # If env variable has parsing error, use default. Notification sent to watchers.
  75. #export NOTIFY_DUE_AT_HOUR_OF_DAY=8
  76. #-----------------------------------------------------------------
  77. # ==== EMAIL NOTIFICATION TIMEOUT, ms =====
  78. # Defaut: 30000 ms = 30s
  79. #export EMAIL_NOTIFICATION_TIMEOUT=30000
  80. #-----------------------------------------------------------------
  81. # CORS: Set Access-Control-Allow-Origin header. Example: *
  82. #export CORS=*
  83. # To enable the Set Access-Control-Allow-Headers header. "Authorization,Content-Type" is required for cross-origin use of the API.
  84. #export CORS_ALLOW_HEADERS=Authorization,Content-Type
  85. # To enable the Set Access-Control-Expose-Headers header. This is not needed for typical CORS situations. Example: *
  86. #export CORS_EXPOSE_HEADERS=*
  87. #---------------------------------------------
  88. ## Optional: Integration with Matomo https://matomo.org that is installed to your server
  89. ## The address of the server where Matomo is hosted:
  90. ##export MATOMO_ADDRESS=https://example.com/matomo
  91. #export MATOMO_ADDRESS=
  92. ## The value of the site ID given in Matomo server for Wekan
  93. # Example: export MATOMO_SITE_ID=123456789
  94. #export MATOMO_SITE_ID=''
  95. ## The option do not track which enables users to not be tracked by matomo"
  96. #Example: export MATOMO_DO_NOT_TRACK=false
  97. #export MATOMO_DO_NOT_TRACK=true
  98. ## The option that allows matomo to retrieve the username:
  99. # Example: export MATOMO_WITH_USERNAME=true
  100. #export MATOMO_WITH_USERNAME='false'
  101. # Enable browser policy and allow one trusted URL that can have iframe that has Wekan embedded inside.
  102. # Setting this to false is not recommended, it also disables all other browser policy protections
  103. # and allows all iframing etc. See wekan/server/policy.js
  104. # Default value: true
  105. export BROWSER_POLICY_ENABLED=true
  106. # When browser policy is enabled, HTML code at this Trusted URL can have iframe that embeds Wekan inside.
  107. # Example: export TRUSTED_URL=http://example.com
  108. export TRUSTED_URL=''
  109. # What to send to Outgoing Webhook, or leave out. Example, that includes all that are default: cardId,listId,oldListId,boardId,comment,user,card,commentId .
  110. # Example: export WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,commentId
  111. export WEBHOOKS_ATTRIBUTES=''
  112. #---------------------------------------------
  113. # ==== OAUTH2 AZURE ====
  114. # https://github.com/wekan/wekan/wiki/Azure
  115. # 1) Register the application with Azure. Make sure you capture
  116. # the application ID as well as generate a secret key.
  117. # 2) Configure the environment variables. This differs slightly
  118. # by installation type, but make sure you have the following:
  119. #export OAUTH2_ENABLED=true
  120. # OAuth2 docs: https://github.com/wekan/wekan/wiki/OAuth2
  121. # OAuth2 login style: popup or redirect.
  122. #export OAUTH2_LOGIN_STYLE=redirect
  123. # Application GUID captured during app registration:
  124. #export OAUTH2_CLIENT_ID=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
  125. # Secret key generated during app registration:
  126. #export OAUTH2_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  127. #export OAUTH2_SERVER_URL=https://login.microsoftonline.com/
  128. #export OAUTH2_AUTH_ENDPOINT=/oauth2/v2.0/authorize
  129. #export OAUTH2_USERINFO_ENDPOINT=https://graph.microsoft.com/oidc/userinfo
  130. #export OAUTH2_TOKEN_ENDPOINT=/oauth2/v2.0/token
  131. # The claim name you want to map to the unique ID field:
  132. #export OAUTH2_ID_MAP=email
  133. # The claim name you want to map to the username field:
  134. #export OAUTH2_USERNAME_MAP=email
  135. # The claim name you want to map to the full name field:
  136. #export OAUTH2_FULLNAME_MAP=name
  137. # The claim name you want to map to the email field:
  138. #export OAUTH2_EMAIL_MAP=email
  139. #-----------------------------------------------------------------
  140. # ==== OAUTH2 KEYCLOAK ====
  141. # https://github.com/wekan/wekan/wiki/Keycloak <== MAPPING INFO, REQUIRED
  142. #export OAUTH2_ENABLED=true
  143. # OAuth2 login style: popup or redirect.
  144. #export OAUTH2_LOGIN_STYLE=redirect
  145. #export OAUTH2_CLIENT_ID=<Keycloak create Client ID>
  146. #export OAUTH2_SERVER_URL=<Keycloak server name>/auth
  147. #export OAUTH2_AUTH_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/auth
  148. #export OAUTH2_USERINFO_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/userinfo
  149. #export OAUTH2_TOKEN_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/token
  150. #export OAUTH2_SECRET=<keycloak client secret>
  151. #-----------------------------------------------------------------
  152. # ==== OAUTH2 DOORKEEPER ====
  153. # OAuth2 docs: https://github.com/wekan/wekan/wiki/OAuth2
  154. # https://github.com/wekan/wekan/issues/1874
  155. # https://github.com/wekan/wekan/wiki/OAuth2
  156. # Enable the OAuth2 connection
  157. #export OAUTH2_ENABLED=true
  158. # OAuth2 login style: popup or redirect.
  159. #export OAUTH2_LOGIN_STYLE=redirect
  160. # OAuth2 Client ID.
  161. #export OAUTH2_CLIENT_ID=abcde12345
  162. # OAuth2 Secret.
  163. #export OAUTH2_SECRET=54321abcde
  164. # OAuth2 Server URL.
  165. #export OAUTH2_SERVER_URL=https://chat.example.com
  166. # OAuth2 Authorization Endpoint.
  167. #export OAUTH2_AUTH_ENDPOINT=/oauth/authorize
  168. # OAuth2 Userinfo Endpoint.
  169. #export OAUTH2_USERINFO_ENDPOINT=/oauth/userinfo
  170. # OAuth2 Token Endpoint.
  171. #export OAUTH2_TOKEN_ENDPOINT=/oauth/token
  172. # OAUTH2 ID Token Whitelist Fields.
  173. #export OAUTH2_ID_TOKEN_WHITELIST_FIELDS=[]
  174. # OAUTH2 Request Permissions.
  175. #export OAUTH2_REQUEST_PERMISSIONS='openid profile email'
  176. # OAuth2 ID Mapping
  177. #export OAUTH2_ID_MAP=
  178. # OAuth2 Username Mapping
  179. #export OAUTH2_USERNAME_MAP=
  180. # OAuth2 Fullname Mapping
  181. #export OAUTH2_FULLNAME_MAP=
  182. # OAuth2 Email Mapping
  183. #export OAUTH2_EMAIL_MAP=
  184. #---------------------------------------------
  185. # LDAP_ENABLE : Enable or not the connection by the LDAP
  186. # example : export LDAP_ENABLE=true
  187. #export LDAP_ENABLE=false
  188. # LDAP_PORT : The port of the LDAP server
  189. # example : export LDAP_PORT=389
  190. #export LDAP_PORT=389
  191. # LDAP_HOST : The host server for the LDAP server
  192. # example : export LDAP_HOST=localhost
  193. #export LDAP_HOST=
  194. # LDAP_BASEDN : The base DN for the LDAP Tree
  195. # example : export LDAP_BASEDN=ou=user,dc=example,dc=org
  196. #export LDAP_BASEDN=
  197. # LDAP_LOGIN_FALLBACK : Fallback on the default authentication method
  198. # example : export LDAP_LOGIN_FALLBACK=true
  199. #export LDAP_LOGIN_FALLBACK=false
  200. # LDAP_RECONNECT : Reconnect to the server if the connection is lost
  201. # example : export LDAP_RECONNECT=false
  202. #export LDAP_RECONNECT=true
  203. # LDAP_TIMEOUT : Overall timeout, in milliseconds
  204. # example : export LDAP_TIMEOUT=12345
  205. #export LDAP_TIMEOUT=10000
  206. # LDAP_IDLE_TIMEOUT : Specifies the timeout for idle LDAP connections in milliseconds
  207. # example : export LDAP_IDLE_TIMEOUT=12345
  208. #export LDAP_IDLE_TIMEOUT=10000
  209. # LDAP_CONNECT_TIMEOUT : Connection timeout, in milliseconds
  210. # example : export LDAP_CONNECT_TIMEOUT=12345
  211. #export LDAP_CONNECT_TIMEOUT=10000
  212. # LDAP_AUTHENTIFICATION : If the LDAP needs a user account to search
  213. # example : export LDAP_AUTHENTIFICATION=true
  214. #export LDAP_AUTHENTIFICATION=false
  215. # LDAP_AUTHENTIFICATION_USERDN : The search user DN
  216. # example : export LDAP_AUTHENTIFICATION_USERDN=cn=admin,dc=example,dc=org
  217. #export LDAP_AUTHENTIFICATION_USERDN=
  218. # LDAP_AUTHENTIFICATION_PASSWORD : The password for the search user
  219. # example : AUTHENTIFICATION_PASSWORD=admin
  220. #export LDAP_AUTHENTIFICATION_PASSWORD=
  221. # LDAP_LOG_ENABLED : Enable logs for the module
  222. # example : export LDAP_LOG_ENABLED=true
  223. #export LDAP_LOG_ENABLED=false
  224. # LDAP_BACKGROUND_SYNC : If the sync of the users should be done in the background
  225. # example : export LDAP_BACKGROUND_SYNC=true
  226. #export LDAP_BACKGROUND_SYNC=false
  227. # LDAP_BACKGROUND_SYNC_INTERVAL : At which interval does the background task sync in milliseconds
  228. # At which interval does the background task sync in milliseconds.
  229. # Leave this unset, so it uses default, and does not crash.
  230. # https://github.com/wekan/wekan/issues/2354#issuecomment-515305722
  231. export LDAP_BACKGROUND_SYNC_INTERVAL=''
  232. # LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED :
  233. # example : export LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED=true
  234. #export LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED=false
  235. # LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS :
  236. # example : export LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS=true
  237. #export LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS=false
  238. # LDAP_ENCRYPTION : If using LDAPS
  239. # example : export LDAP_ENCRYPTION=ssl
  240. #export LDAP_ENCRYPTION=false
  241. # LDAP_CA_CERT : The certification for the LDAPS server. Certificate needs to be included in this docker-compose.yml file.
  242. # example : export LDAP_CA_CERT=-----BEGIN CERTIFICATE-----MIIE+zCCA+OgAwIBAgIkAhwR/6TVLmdRY6hHxvUFWc0+Enmu/Hu6cj+G2FIdAgIC...-----END CERTIFICATE-----
  243. #export LDAP_CA_CERT=
  244. # LDAP_REJECT_UNAUTHORIZED : Reject Unauthorized Certificate
  245. # example : export LDAP_REJECT_UNAUTHORIZED=true
  246. #export LDAP_REJECT_UNAUTHORIZED=false
  247. # 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).
  248. #export LDAP_USER_AUTHENTICATION=true
  249. # Which field is used to find the user for the user authentication. Default: uid.
  250. #export LDAP_USER_AUTHENTICATION_FIELD=uid
  251. # LDAP_USER_SEARCH_FILTER : Optional extra LDAP filters. Don't forget the outmost enclosing parentheses if needed
  252. # example : export LDAP_USER_SEARCH_FILTER=
  253. #export LDAP_USER_SEARCH_FILTER=
  254. # 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)
  255. # example : export LDAP_USER_SEARCH_SCOPE=one
  256. #export LDAP_USER_SEARCH_SCOPE=
  257. # LDAP_USER_SEARCH_FIELD : Which field is used to find the user
  258. # example : export LDAP_USER_SEARCH_FIELD=uid
  259. #export LDAP_USER_SEARCH_FIELD=
  260. # LDAP_SEARCH_PAGE_SIZE : Used for pagination (0=unlimited)
  261. # example : export LDAP_SEARCH_PAGE_SIZE=12345
  262. #export LDAP_SEARCH_PAGE_SIZE=0
  263. # LDAP_SEARCH_SIZE_LIMIT : The limit number of entries (0=unlimited)
  264. # example : export LDAP_SEARCH_SIZE_LIMIT=12345
  265. #export LDAP_SEARCH_SIZE_LIMIT=0
  266. # LDAP_GROUP_FILTER_ENABLE : Enable group filtering
  267. # example : export LDAP_GROUP_FILTER_ENABLE=true
  268. #export LDAP_GROUP_FILTER_ENABLE=false
  269. # LDAP_GROUP_FILTER_OBJECTCLASS : The object class for filtering
  270. # example : export LDAP_GROUP_FILTER_OBJECTCLASS=group
  271. #export LDAP_GROUP_FILTER_OBJECTCLASS=
  272. # LDAP_GROUP_FILTER_GROUP_ID_ATTRIBUTE :
  273. # example :
  274. #export LDAP_GROUP_FILTER_GROUP_ID_ATTRIBUTE=
  275. # LDAP_GROUP_FILTER_GROUP_MEMBER_ATTRIBUTE :
  276. # example :
  277. #export LDAP_GROUP_FILTER_GROUP_MEMBER_ATTRIBUTE=
  278. # LDAP_GROUP_FILTER_GROUP_MEMBER_FORMAT :
  279. # example :
  280. #export LDAP_GROUP_FILTER_GROUP_MEMBER_FORMAT=
  281. # LDAP_GROUP_FILTER_GROUP_NAME :
  282. # example :
  283. #export LDAP_GROUP_FILTER_GROUP_NAME=
  284. # LDAP_UNIQUE_IDENTIFIER_FIELD : This field is sometimes class GUID (Globally Unique Identifier)
  285. # example : export LDAP_UNIQUE_IDENTIFIER_FIELD=guid
  286. #export LDAP_UNIQUE_IDENTIFIER_FIELD=
  287. # LDAP_UTF8_NAMES_SLUGIFY : Convert the username to utf8
  288. # example : export LDAP_UTF8_NAMES_SLUGIFY=false
  289. #export LDAP_UTF8_NAMES_SLUGIFY=true
  290. # LDAP_USERNAME_FIELD : Which field contains the ldap username
  291. # example : export LDAP_USERNAME_FIELD=username
  292. #export LDAP_USERNAME_FIELD=
  293. # LDAP_FULLNAME_FIELD : Which field contains the ldap fullname
  294. # example : export LDAP_FULLNAME_FIELD=fullname
  295. #export LDAP_FULLNAME_FIELD=
  296. # LDAP_MERGE_EXISTING_USERS :
  297. # example : export LDAP_MERGE_EXISTING_USERS=true
  298. #export LDAP_MERGE_EXISTING_USERS=false
  299. # LDAP_EMAIL_MATCH_ENABLE : allow existing account matching by e-mail address when username does not match
  300. # example: LDAP_EMAIL_MATCH_ENABLE=true
  301. #export LDAP_EMAIL_MATCH_ENABLE=false
  302. # LDAP_EMAIL_MATCH_REQUIRE : require existing account matching by e-mail address when username does match
  303. # example: LDAP_EMAIL_MATCH_REQUIRE=true
  304. #export LDAP_EMAIL_MATCH_REQUIRE=false
  305. # LDAP_EMAIL_MATCH_VERIFIED : require existing account email address to be verified for matching
  306. # example: LDAP_EMAIL_MATCH_VERIFIED=true
  307. #export LDAP_EMAIL_MATCH_VERIFIED=false
  308. # LDAP_EMAIL_FIELD : which field contains the LDAP e-mail address
  309. # example: LDAP_EMAIL_FIELD=mail
  310. #export LDAP_EMAIL_FIELD=
  311. # LDAP_SYNC_USER_DATA :
  312. # example : export LDAP_SYNC_USER_DATA=true
  313. #export LDAP_SYNC_USER_DATA=false
  314. # LDAP_SYNC_USER_DATA_FIELDMAP :
  315. # example : export LDAP_SYNC_USER_DATA_FIELDMAP={"cn":"name", "mail":"email"}
  316. #export LDAP_SYNC_USER_DATA_FIELDMAP=
  317. # LDAP_SYNC_GROUP_ROLES :
  318. # example :
  319. #export LDAP_SYNC_GROUP_ROLES=
  320. # 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
  321. # example :
  322. #export LDAP_DEFAULT_DOMAIN=
  323. # Enable/Disable syncing of admin status based on ldap groups:
  324. #export LDAP_SYNC_ADMIN_STATUS=true
  325. # Comma separated list of admin group names to sync.
  326. #export LDAP_SYNC_ADMIN_GROUPS=group1,group2
  327. #---------------------------------------------------------------------
  328. # Login to LDAP automatically with HTTP header.
  329. # In below example for siteminder, at right side of = is header name.
  330. #export HEADER_LOGIN_ID=HEADERUID
  331. #export HEADER_LOGIN_FIRSTNAME=HEADERFIRSTNAME
  332. #export HEADER_LOGIN_LASTNAME=HEADERLASTNAME
  333. #export HEADER_LOGIN_EMAIL=HEADEREMAILADDRESS
  334. #---------------------------------------------------------------------
  335. # LOGOUT_WITH_TIMER : Enables or not the option logout with timer
  336. # example : LOGOUT_WITH_TIMER=true
  337. #export LOGOUT_WITH_TIMER=
  338. # LOGOUT_IN : The number of days
  339. # example : LOGOUT_IN=1
  340. #export LOGOUT_IN=
  341. #export LOGOUT_ON_HOURS=
  342. # LOGOUT_ON_MINUTES : The number of minutes
  343. # example : LOGOUT_ON_MINUTES=55
  344. #export LOGOUT_ON_MINUTES=
  345. node main.js
  346. # & >> ../../wekan.log
  347. cd ../..
  348. #done