tidee
March 1, 2015, 2:16am
1
Can a settings.json file be used in the root of a project in order to affect the application? If so, could someone point me in the direction of some documentation on this?
Sanjo
March 1, 2015, 2:19am
2
As of December 2023 the docs are here:
And it is still very relevant.
xet7
December 22, 2023, 7:34pm
4
@tidee
I currently use environment variables for most settings at all platforms. Supporting all platforms at same main branch.
Docker
# This docker-compose.yml uses FerretDB v1 with SQLite from
# https://github.com/wekan/FerretDB by default.
#
# WeKan with FerretDB v1 + embedded SQLite (no PostgreSQL, no MongoDB)
#
# This is the DEFAULT WeKan compose file (docker-compose.yml): a light,
# self-contained database โ FerretDB v1 (the wekan/FerretDB fork,
# https://github.com/wekan/FerretDB) with its embedded pure-Go SQLite backend,
# which speaks the MongoDB wire protocol. There is no separate PostgreSQL or
# MongoDB server โ FerretDB stores everything in SQLite files on a volume, and
# WeKan stores attachments/avatars on the filesystem.
#
# The other WeKan compose files:
# docker-compose.yml FerretDB v1 + SQLite (default)
# docker-compose-ferretdb-v1-postgresql.yml FerretDB v1 + PostgreSQL
# docker-compose-ferretdb-v1-mysql.yml FerretDB v1 + MySQL
# docker-compose-ferretdb-v1-mariadb.yml FerretDB v1 + MariaDB
# docker-compose-ferretdb-v1-sap-hana.yml FerretDB v1 + SAP HANA
# docker-compose-ferretdb-v2-postgresql.yml FerretDB 2 + PostgreSQL
# docker-compose-mongodb-v7.yml MongoDB 7
This file has been truncated. show original
Snap
#!/bin/sh
# All supported keys are defined here together with descriptions and default values
# list of supported keys
keys="WEKAN_AUTOPICK WEKAN_AUTOPICK_TIMEOUT DEBUG BIND_IP MAIL_TLS_CA_CERT MAIL_TLS_SERVERNAME WEBHOOK_TLS_CA_CERT WEKAN_FERRETDB_OPLOG WEKAN_FERRETDB_HANDLER WEKAN_FERRETDB_URL DDP_TRANSPORT METEOR_REACTIVITY_ORDER MONGO_LOG_DESTINATION MONGO_URL MONGO_OPLOG_URL MONGODB_BIND_UNIX_SOCKET MONGODB_BIND_IP MONGODB_PORT MAIL_URL MAIL_FROM MAIL_SERVICE MAIL_SERVICE_USER MAIL_SERVICE_PASSWORD ROOT_URL PORT DISABLE_MONGODB CADDY_ENABLED CADDY_BIND_PORT WITH_API RICHER_CARD_COMMENT_EDITOR CARDS_LOADING CARD_OPENED_WEBHOOK_ENABLED ACCOUNTS_LOCKOUT_KNOWN_USERS_FAILURES_BEFORE ACCOUNTS_LOCKOUT_KNOWN_USERS_PERIOD ACCOUNTS_LOCKOUT_KNOWN_USERS_FAILURE_WINDOW ACCOUNTS_LOCKOUT_UNKNOWN_USERS_FAILURES_BERORE ACCOUNTS_LOCKOUT_UNKNOWN_USERS_LOCKOUT_PERIOD ACCOUNTS_LOCKOUT_UNKNOWN_USERS_FAILURE_WINDOW ACCOUNTS_COMMON_LOGIN_EXPIRATION_IN_DAYS ATTACHMENTS_UPLOAD_EXTERNAL_PROGRAM ATTACHMENTS_UPLOAD_MIME_TYPES ATTACHMENTS_UPLOAD_MAX_SIZE AVATARS_UPLOAD_EXTERNAL_PROGRAM AVATARS_UPLOAD_MIME_TYPES AVATARS_UPLOAD_MAX_SIZE MAX_IMAGE_PIXEL IMAGE_COMPRESS_RATIO BIGEVENTS_PATTERN NOTIFICATION_TRAY_AFTER_READ_DAYS_BEFORE_REMOVE NOTIFY_DUE_DAYS_BEFORE_AND_AFTER NOTIFY_DUE_AT_HOUR_OF_DAY DEFAULT_BOARD_ID EMAIL_NOTIFICATION_TIMEOUT CORS CORS_ALLOW_HEADERS CORS_EXPOSE_HEADERS MATOMO_ADDRESS MATOMO_SITE_ID MATOMO_DO_NOT_TRACK MATOMO_WITH_USERNAME METRICS_ALLOWED_IP_ADDRESSES BROWSER_POLICY_ENABLED TRUSTED_URL WEBHOOKS_ATTRIBUTES OAUTH2_ENABLED OIDC_REDIRECTION_ENABLED OAUTH2_CA_CERT OAUTH2_LOGIN_STYLE OAUTH2_CLIENT_ID OAUTH2_SECRET OAUTH2_SERVER_URL OAUTH2_AUTH_ENDPOINT OAUTH2_USERINFO_ENDPOINT OAUTH2_TOKEN_ENDPOINT OAUTH2_LOGOUT_ENDPOINT OAUTH2_ID_MAP OAUTH2_USERNAME_MAP OAUTH2_FULLNAME_MAP OAUTH2_ID_TOKEN_WHITELIST_FIELDS OAUTH2_EMAIL_MAP OAUTH2_REQUEST_PERMISSIONS OAUTH2_ADFS_ENABLED OAUTH2_B2C_ENABLED OAUTH2_MERGE_EXISTING_USERS LDAP_ENABLE LDAP_PORT LDAP_HOST LDAP_AD_SIMPLE_AUTH LDAP_BASEDN LDAP_LOGIN_FALLBACK LDAP_RECONNECT LDAP_TIMEOUT LDAP_IDLE_TIMEOUT LDAP_CONNECT_TIMEOUT LDAP_AUTHENTIFICATION LDAP_AUTHENTIFICATION_USERDN LDAP_AUTHENTIFICATION_PASSWORD LDAP_LOG_ENABLED LDAP_BACKGROUND_SYNC LDAP_BACKGROUND_SYNC_INTERVAL LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS LDAP_ENCRYPTION LDAP_CA_CERT LDAP_REJECT_UNAUTHORIZED LDAP_USER_AUTHENTICATION LDAP_USER_AUTHENTICATION_FIELD LDAP_USER_SEARCH_FILTER LDAP_USER_SEARCH_SCOPE LDAP_USER_SEARCH_FIELD LDAP_SEARCH_PAGE_SIZE LDAP_SEARCH_SIZE_LIMIT LDAP_GROUP_FILTER_ENABLE LDAP_GROUP_FILTER_OBJECTCLASS LDAP_GROUP_FILTER_GROUP_ID_ATTRIBUTE LDAP_GROUP_FILTER_GROUP_MEMBER_ATTRIBUTE LDAP_GROUP_FILTER_GROUP_MEMBER_FORMAT LDAP_GROUP_FILTER_GROUP_NAME LDAP_UNIQUE_IDENTIFIER_FIELD LDAP_UTF8_NAMES_SLUGIFY LDAP_USERNAME_FIELD LDAP_FULLNAME_FIELD LDAP_MERGE_EXISTING_USERS LDAP_SYNC_USER_DATA LDAP_SYNC_USER_DATA_FIELDMAP LDAP_SYNC_GROUP_ROLES LDAP_DEFAULT_DOMAIN LDAP_EMAIL_MATCH_ENABLE LDAP_EMAIL_MATCH_REQUIRE LDAP_EMAIL_MATCH_VERIFIED LDAP_EMAIL_FIELD LDAP_SYNC_ADMIN_STATUS LDAP_SYNC_ADMIN_GROUPS HEADER_LOGIN_ID HEADER_LOGIN_FIRSTNAME HEADER_LOGIN_LASTNAME HEADER_LOGIN_EMAIL HEADER_LOGIN_TRUSTED_IPS HEADER_LOGIN_TRUSTED_PROXIES LOGOUT_WITH_TIMER LOGOUT_IN LOGOUT_ON_HOURS LOGOUT_ON_MINUTES DEFAULT_AUTHENTICATION_METHOD PASSWORD_LOGIN_ENABLED CAS_ENABLED CAS_BASE_URL CAS_LOGIN_URL CAS_VALIDATE_URL SAML_ENABLED SAML_PROVIDER SAML_ENTRYPOINT SAML_ISSUER SAML_CERT SAML_IDPSLO_REDIRECTURL SAML_PRIVATE_KEYFILE SAML_PUBLIC_CERTFILE SAML_IDENTIFIER_FORMAT SAML_LOCAL_PROFILE_MATCH_ATTRIBUTE SAML_ATTRIBUTES OAUTH_GOOGLE_ENABLED OAUTH_GOOGLE_CLIENT_ID OAUTH_GOOGLE_SECRET OAUTH_GOOGLE_SECRET_FILE OAUTH_GITHUB_ENABLED OAUTH_GITHUB_CLIENT_ID OAUTH_GITHUB_SECRET OAUTH_GITHUB_SECRET_FILE OAUTH_FACEBOOK_ENABLED OAUTH_FACEBOOK_APP_ID OAUTH_FACEBOOK_SECRET OAUTH_FACEBOOK_SECRET_FILE OAUTH_TWITTER_ENABLED OAUTH_TWITTER_CONSUMER_KEY OAUTH_TWITTER_SECRET OAUTH_TWITTER_SECRET_FILE OAUTH_METEOR_DEVELOPER_ENABLED OAUTH_METEOR_DEVELOPER_CLIENT_ID OAUTH_METEOR_DEVELOPER_SECRET OAUTH_METEOR_DEVELOPER_SECRET_FILE OAUTH_WEIBO_ENABLED OAUTH_WEIBO_CLIENT_ID OAUTH_WEIBO_SECRET OAUTH_WEIBO_SECRET_FILE OAUTH_MEETUP_ENABLED OAUTH_MEETUP_CLIENT_ID OAUTH_MEETUP_SECRET OAUTH_MEETUP_SECRET_FILE OAUTH_PROVIDERS_LOGIN_STYLE OAUTH_PROVIDERS_MERGE_EXISTING_USERS PASSWORDLESS_ENABLED ORACLE_OIM_ENABLED RESULTS_PER_PAGE WAIT_SPINNER NODE_OPTIONS LDAP_AUTHENTIFICATION_PASSWORD_FILE OAUTH2_SECRET_FILE MAIL_SERVICE_PASSWORD_FILE MONGO_PASSWORD_FILE S3 S3_SECRET_FILE OAUTH2_AUTO_REGISTRATION OAUTH2_ADMIN_GROUPS NOTIFY_ON_ASSIGN LDAP_BACKGROUND_SYNC_DISABLE_NONEXISTANT_USERS LDAP_SYNC_ORGANIZATIONS LDAP_SYNC_ORGANIZATIONS_GROUPS LDAP_SYNC_TEAMS LDAP_SYNC_TEAMS_GROUPS"
#-------------------- TWO COPIES OF THE DATA --------------------
# After a MongoDB -> FerretDB migration both copies stay on disk, and if both have
# been written to since, bin/database-autopick reads them and serves the one that
# holds
This file has been truncated. show original
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# snapcraft.yaml โ the DEFAULT WeKan snap, built on `base: core24`.
#
# This is the file the release pipeline (.github/workflows/release-all.yml) and
# releases/snap-build.sh use, and `base: core24` is WHY: core24 is a released
# base, so a snap built on it may carry `grade: stable` and be published to ALL
# FOUR channels โ stable, candidate, beta and edge. Every snap job does exactly
# that (snap-native, snap-launchpad and snap-variants all publish
# `stable,candidate,beta,edge`), for the default snap and for the wekan-ondra and
# wekan-gantt-gpl variants alike. It ships the newest WeKan (Meteor 3.5,
# Node.js 24, FerretDB v1, MongoDB 7, Caddy 2).
#
# snapcraft-core26.yaml is the SAME WeKan on `base: core26`, kept for testing the
# next base and NOT built by the release: core26 is still experimental, it
# requires `build-base: devel` and therefore `grade: devel`, and a devel-grade
# snap is refused by the stable and candidate channels โ it can only go to beta
# and edge. That is the whole reason the release builds core24. Keep the two in
# sync โ the only intended differences are:
# base: core24 (not core26) ยท no build-base: devel ยท grade: stable
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
This file has been truncated. show original
Bash script for Source Bundle
#!/bin/bash
# If you want to restart even on crash, uncomment while and done lines.
#while true; do
#-------------------- LOCAL MONGODB SETTINGS (RUN SEPARATELY) --------------------
# This script starts only Wekan app. Start local mongod with these settings:
# mongod --storageEngine wiredTiger --wiredTigerCacheSizeGB 32 \
# --timeZoneInfo /usr/share/zoneinfo \
# --setParameter logicalSessionRefreshMillis=900000 \
# --setParameter localLogicalSessionTimeoutMinutes=45 \
# --oplogSize 20480 --replSet rs0 --bind_ip 127.0.0.1 --port 27017
#-------------------------------------------------------------------------------
#-------------------- INITIALIZE REPLICA SET IF NEEDED --------------------
# Change Streams require MongoDB to run as a replica set.
# This checks if the replica set is already initialized, and if not, initializes it.
# MongoDB must already be running at 127.0.0.1:27017.
# Replica-set init/readiness use db-eval (Node.js + the `mongodb` driver from
# node_modules) instead of mongosh, so no mongosh binary is required.
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
NODE_BIN="$(command -v node || true)"
This file has been truncated. show original
The Open Source kanban, built with Meteor. GitHub issues/PRs are only for FLOSS Developers, not for support, support is at https://wekan.fi/commercial-support/ . PR source translation to imports/i18n/data/en.i18n.json, other translations at https://app.transifex.com/wekan/wekan . No telemetry.
Bat script for Windows
@ECHO OFF
REM # If port is 80, must change ROOT_URL to: http://YOUR-WEKAN-SERVER-IPv4-ADDRESS , like http://192.168.0.100
REM # If ROOT_URL is not correct, these do not work: translations, uploading attachments.
SET ROOT_URL=http://localhost
REM # PORT Where WeKan Node.js running:
SET PORT=80
REM # wget -c https://downloads.mongodb.com/compass/mongosh-2.8.3-win32-x64.zip
REM # 7z x mongosh-2.8.3-win32-x64.zip
REM # move mongodb-database-tools-windows-x86_64-100.17.0\bin\*.exe .
REM # wget -c https://fastdl.mongodb.org/tools/db/mongodb-database-tools-windows-x86_64-100.17.0.zip
REM #7z x mongodb-database-tools-windows-x86_64-100.17.0.zip
REM # move mongodb-database-tools-windows-x86_64-100.17.0\bin\mongosh.exe .
REM # ------------------- HOWTO ---------------------
REM # https://github.com/wekan/wekan/wiki/Offline
REM # ------------------- LOCAL MONGODB SETTINGS (RUN SEPARATELY) -------------------
REM # This script starts only Wekan app. Start local mongod with these settings:
This file has been truncated. show original
Some settings for Sandstorm
argv = ["/sandstorm-http-bridge", "4000", "--", "./start-memory.sh"],
environ = [
# Note that this defines the *entire* environment seen by your app.
#---------------------------------------------------------------------
# https://github.com/wekan/wekan/issues/3585#issuecomment-1021522132
# Add more Node heap:
#export NODE_OPTIONS="--max_old_space_size=4096"
# Add more stack:
#bash -c "ulimit -s 65500; exec node --stack-size=65500 main.js"
#---------------------------------------------------------------------
(key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
# Files root for the Node24/FerretDB build: attachments/, avatars/ and the
# FerretDB SQLite db/ live under /var/files (start.js also exports this). See
# docs/Platforms/FOSS/Container/Sandstorm/Meteor3/Migration.md.
(key = "WRITABLE_PATH", value = "/var/files"),
(key = "RESULTS_PER_PAGE", value = ""),
(key = "WITH_API", value = "true"),
(key = "RICHER_CARD_COMMENT_EDITOR", value="false"),
(key = "CARD_OPENED_WEBHOOK_ENABLED", value="false"),
(key = "NOTIFICATION_TRAY_AFTER_READ_DAYS_BEFORE_REMOVE", value=""),
(key = "BIGEVENTS_PATTERN", value="NONE"),
How to use serverside environment variables at clientside/browserside
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { WebApp } from 'meteor/webapp';
import {
findOrCreateHeaderLoginUser,
isTrustedHeaderLoginSource,
shouldProcessHeaderLoginMiddlewareRequest,
} from '/server/lib/headerLoginAuth';
async function issueLoginTokenCookies(userId, req, res) {
if (!userId) {
return;
}
const stampedToken = Accounts._generateStampedLoginToken();
const hashedToken = Accounts._hashStampedToken(stampedToken);
const tokenExpires = Accounts._tokenExpiration(stampedToken.when);
await Meteor.users.updateAsync(
{ _id: userId },
This file has been truncated. show original
Admin Panel
Admin Panel web UI has some additional settings, that can be clicked.
main/client/components/settings
The Open Source kanban, built with Meteor. GitHub issues/PRs are only for FLOSS Developers, not for support, support is at https://wekan.fi/commercial-support/ . PR source translation to imports/i1...