start-wekan.sh 18 KB

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