start-wekan.sh 16 KB

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