aWhere Manual
Install and run a site

Node settings

Where a node's settings live, the values you use often, and the tables generated from each Release's code

This page says where the settings of nodes and apps live, and which values you use often. Every container reads its settings from its own environment variables.

Where the settings live

  • Docker uses one env file for the whole site: /etc/awhere/docker.env. You can set only the values that are in this file. If a value has a $ sign, write it as %24.
  • Apple Container uses one env file per container: /etc/awhere/<name>.env, where <name> is the container name. A value in this file replaces the one set in the image, and the system reads it literally. It does not expand ${...}.
  • An env file holds passwords. Make it readable only by the account that runs the containers.
  • After you edit a file, check it with awhere preflight (Preflight). A new value takes effect when the container is created again, such as when you run awhere upgrade.

Values that point to a database

  • DATASTORE_URL, CONTENT_STORE_URL, SESSION_STORE_URL and LOG_STORE_URL are MongoDB connection strings of the form mongodb://<user>:<password>@<hosts>/<database>?authSource=admin. Put the other options, such as authSource, replicaSet, tls and maxPoolSize, in this URL too.
  • The split variables of v4 no longer work: <STORE>_HOSTS, _NAME, _USER, _PASS, _MACHANISM, _SSL and _POOL_SIZE, where <STORE> is the prefix, such as DATASTORE. If a URL is also set, the system ignores these variables and Preflight warns you to delete them. If there is no URL, the node will not start.
  • authorization-server keeps its sessions in SESSION_STORE_URL. If the MongoDB server announces an internal host name that the container cannot find, put directConnection=true in the URL.
  • FILE_STORE_URL moves the file store out of the content database. Leave it unset unless you have a specific reason.

The broker the nodes talk through

TRANSPORTER (nats://<host>:4222, or TCP if the whole site is on one machine) and NAMESPACE (usually awhere) must be the same on every node. Every node reads these two names. The old names SERVICE_TRANSPORTER and SERVICE_NAMESPACE still work when the new names are not set. Change them to the new names (authorization-server warns once at start). For each node, see All environment variables.

Values that can keep their defaults

VariableNodeDefaultWhat it does
PORTNodes with HTTP3000 (set in the image)The port the node listens on inside the container.
BASE_PATHauthorization-server/api/auth/The path of the sign-in page. You can change it at run time with no new build.
THUMBNAIL_MAX_BYTESfile-services256 MiBThe largest file the system will make a thumbnail for. It keeps memory use down.
AUDIT_RETENTION_DAYSlogging-services365How many days the Audit log is kept. 0 keeps it forever.
USAGE_TIMEZONElogging-servicesAsia/BangkokThe time zone that cuts the day in the usage numbers.
MANUAL_URLcore-servicesThe public manualThe page the Help button opens. A site with its own manual must set this.

app-studio and logging fix the path of the app at build time, not at run time. Setting the path in the env file alone is not enough.

Tables generated from the code

On this page