Browse Source

chore: Updated configuration docs

Owen Diffey 1 year ago
parent
commit
3e763422de
5 changed files with 149 additions and 143 deletions
  1. 127 110
      .wiki/Configuration.md
  2. 9 17
      .wiki/Installation.md
  3. 9 12
      .wiki/Upgrading.md
  4. 2 2
      backend/config/default.json
  5. 2 2
      backend/config/template.json

+ 127 - 110
.wiki/Configuration.md

@@ -1,19 +1,91 @@
 # Configuration
 
-## Backend
+## Environment Variables
 
-Location: `backend/config/default.json`
+Environment variables are the means of configuring application services,
+particularly with our standard Docker environment.
+
+For our standard Docker setup variables should be defined in `.env`,
+an example can be found in `.env.example`.
+After updating values containers should be restarted.
+If you are using another setup you will need to define the relevant
+environment variables yourself.
+
+In the table below the container host refers to the IP address that the Docker
+container listens on, setting this to `127.0.0.1` for example will only expose
+the configured port to localhost, whereas setting to `0.0.0.0` will expose the
+port on all interfaces.
+
+The container port refers to the external Docker container port, used to access
+services within the container. Changing this does not require any changes to
+configuration within container. For example setting the `MONGO_PORT` to `21018`
+will allow you to access the mongo service through that port, even though the
+application within the container is listening on `21017`.
 
 | Property | Description |
 | --- | --- |
-| `mode` | Should be either `development` or `production`. |
-| `migration` | Should be set to `true` if you need to update MongoDB documents to a newer version after an update. Should be false at all other times. |
+| `COMPOSE_PROJECT_NAME` | Should be a unique name for this installation, especially if you have multiple instances of Musare on the same machine. |
+| `RESTART_POLICY` | Restart policy for Docker containers, values can be found [here](https://docs.docker.com/config/containers/start-containers-automatically/). |
+| `CONTAINER_MODE` | Should be either `production` or `development`.  |
+| `DOCKER_COMMAND` | Should be either `docker` or `podman`.  |
+| `BACKEND_HOST` | Backend container host. |
+| `BACKEND_PORT` | Backend container port. |
+| `FRONTEND_HOST` | Frontend container host. |
+| `FRONTEND_PORT` | Frontend container port. |
+| `FRONTEND_CLIENT_PORT` | Should be the port on which the frontend will be accessible from, usually port `80`, or `443` if using SSL. Only used when running in development mode. |
+| `FRONTEND_DEV_PORT` | Should be the port where Vite's dev server will be accessible from, should always be port `81` for Docker since nginx listens on port 80, and is recommended to be port `80` for non-Docker. Only used when running in development mode. |
+| `FRONTEND_MODE` | Should be either `production` or `development`. |
+| `FRONTEND_PROD_DEVTOOLS` | Whether to enable Vue dev tools in production builds. [^1] |
+| `MONGO_HOST` | Mongo container host. |
+| `MONGO_PORT` | Mongo container port. |
+| `MONGO_ROOT_PASSWORD` | Password of the root/admin user for MongoDB. |
+| `MONGO_USER_USERNAME` | Application username for MongoDB. |
+| `MONGO_USER_PASSWORD` | Application password for MongoDB. |
+| `MONGO_DATA_LOCATION` | The location where MongoDB stores its data. Usually the `.db` folder inside the `Musare` folder. |
+| `MONGO_VERSION` | The MongoDB version to use for scripts and docker-compose. Must be numerical. Currently supported MongoDB versions are 4.0+. Always backup before changing this value. |
+| `REDIS_HOST` | Redis container host. |
+| `REDIS_PORT` | Redis container port. |
+| `REDIS_PASSWORD` | Redis password. |
+| `REDIS_DATA_LOCATION` | The location where Redis stores its data. Usually the `.redis` folder inside the `Musare` folder. |
+| `BACKUP_LOCATION` | Directory to store musare.sh backups. Defaults to `/backups` in script location. |
+| `BACKUP_NAME` | Name of musare.sh backup files. Defaults to `musare-$(date +"%Y-%m-%d-%s").dump`. |
+| `MUSARE_SITENAME` | Should be the name of the site. [^1] |
+| `MUSARE_DEBUG_VERSION` | Log the current package.json version. [^1] |
+| `MUSARE_DEBUG_GIT_REMOTE` | Log the current Git repository's remote. [^1] |
+| `MUSARE_DEBUG_GIT_REMOTE_URL` | Log the current Git repository's remote URL. [^1] |
+| `MUSARE_DEBUG_GIT_BRANCH` | Log the current Git repository's branch. [^1] |
+| `MUSARE_DEBUG_GIT_LATEST_COMMIT` | Log the current Git repository's latest commit hash. [^1] |
+| `MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT` | Log the current Git repository's latest commit hash (short). [^1] |
+
+[^1]: If value is changed the frontend will require a rebuild in production mode.
+
+## Backend Config
+
+The backend config serves as the primary configuration means of the application,
+the default values can be found in `backend/config/default.json`.
+
+To overwrite these create a local config e.g. `backend/config/local.json`
+and define key/values. A basic template can be found in `backend/config/template.json`.
+
+If the default configuration changes so will the `configVersion`.
+When updating please refer to the `default.json`, make any required
+changes to your `local.json` and update your `configVersion`.
+
+Some configuration values inherit from
+[Environment Variables](#environment-variables)
+and can not be overwritten with `local.json`.
+These values can be found in `backend/config/custom-environment-variables.json`.
+
+| Property | Description |
+| --- | --- |
+| `configVersion` | Version of the config. Every time the template changes, you should change your config accordingly and update the configVersion. |
+| `migration` | Set to `true` if you need to update MongoDB documents to a newer version after an update. Should be `false` at all other times. |
 | `secret` | Set to something unique and secure - used by express's session module. |
-| `domain` | Should be the url where the site will be accessible from, usually `http://localhost` for non-Docker. |
-| `serverDomain` | Should be the url where the backend will be accessible from, usually `http://localhost/backend` for docker or `http://localhost:8080` for non-Docker. |
-| `serverPort` | Should be the port where the backend will listen on, should always be `8080` for Docker, and is recommended for non-Docker. |
-| `registrationDisabled` | If set to true, users can't register accounts. |
-| `sendDataRequestEmails` | If `true` all admin users will be sent an email if a data request is received. |
+| `port` | The port the backend will listen on, should always be `8080` for Docker, and is recommended for non-Docker. |
+| `url.host` | Hostname used to access application, e.g. `localhost`. |
+| `url.secure` | Should be `true` if served securely behind SSL, otherwise `false`. |
+| `cookie` | Name of the cookie stored for sessions. |
+| `sitename` | Should be the name of the site. |
 | `apis.youtube.key` | YouTube Data API v3 key, obtained from [here](https://developers.google.com/youtube/v3/getting-started). |
 | `apis.youtube.rateLimit` | Minimum interval between YouTube API requests in milliseconds. |
 | `apis.youtube.requestTimeout` | YouTube API requests timeout in milliseconds. |
@@ -22,136 +94,81 @@ Location: `backend/config/default.json`
 | `apis.youtube.quotas.type` | YouTube API quota type, should be one of `QUERIES_PER_DAY`, `QUERIES_PER_MINUTE` or `QUERIES_PER_100_SECONDS`. |
 | `apis.youtube.quotas.title` | YouTube API quota title. |
 | `apis.youtube.quotas.limit` | YouTube API quota limit. |
-| `apis.recaptcha.secret` | ReCaptcha Site v3 secret, obtained from [here](https://www.google.com/recaptcha/admin). |
+| `apis.youtube.maxPlaylistPages` | Maximum pages to fetch from YouTube playlists. |
+| `apis.spotify.clientId` | Spotify API clientId, obtained from [here](https://developer.spotify.com/documentation/web-api/tutorials/getting-started). |
+| `apis.spotify.clientSecret` | Spotify API clientSecret, obtained with clientId. |
+| `apis.spotify.rateLimit` | Minimum interval between Spotify API requests in milliseconds. |
+| `apis.spotify.requestTimeout` | Spotify API requests timeout in milliseconds. |
+| `apis.spotify.retryAmount` | The amount of retries to perform of a failed Spotify API request. |
+| `apis.soundcloud.rateLimit` | Minimum interval between SoundCloud API requests in milliseconds. |
+| `apis.soundcloud.requestTimeout` | SoundCloud API requests timeout in milliseconds. |
+| `apis.soundcloud.retryAmount` | The amount of retries to perform of a failed SoundCloud API request. |
 | `apis.recaptcha.enabled` | Whether to enable ReCaptcha at email registration. |
+| `apis.recaptcha.key` | ReCaptcha Site v3 key, obtained from [here](https://www.google.com/recaptcha/admin). |
+| `apis.recaptcha.secret` | ReCaptcha Site v3 secret, obtained with key. |
 | `apis.github.enabled` | Whether to enable GitHub authentication. |
 | `apis.github.client` | GitHub OAuth Application client, obtained from [here](https://github.com/settings/developers). |
 | `apis.github.secret` | GitHub OAuth Application secret, obtained with client. |
-| `apis.github.redirect_uri` | The authorization callback url is the backend url with `/auth/github/authorize/callback` appended, for example `http://localhost/backend/auth/github/authorize/callback`. |
+| `apis.github.redirect_uri` | The authorization callback url is the backend url with `/auth/github/authorize/callback` appended, for example `http://localhost/backend/auth/github/authorize/callback`. This is automatically configured based on `url` config by default. |
+| `apis.discogs.enabled` | Whether to enable Discogs API usage. |
 | `apis.discogs.client` | Discogs Application client, obtained from [here](https://www.discogs.com/settings/developers). |
 | `apis.discogs.secret` | Discogs Application secret, obtained with client. |
-| `apis.discogs.enabled` | Whether to enable Discogs API usage. |
-| `cors.origin` | Array of allowed request origin urls, for example `http://localhost`. |
-| `smtp.host` | SMTP Host |
-| `smtp.port` | SMTP Port |
-| `smtp.auth.user` | SMTP Username |
-| `smtp.auth.pass` | SMTP Password |
-| `smtp.secure` | Whether SMTP is secured. |
-| `smtp.enabled` | Whether SMTP and sending emails is enabled. |
-| `mail.from` | The from field for mails sent from backend. |
+| `cors.origin` | Array of allowed request origin urls, for example `http://localhost`. The configured `url` is automatically inserted. |
+| `mail.enabled` | Whether sending emails and related functionality (e.g. password resets) is enabled. |
+| `mail.from` | The from field for mails sent from backend. Automatically configured based on config to be `{sitename} <noreply@{url.host}>` by default. |
+| `mail.smtp.host` | SMTP Host |
+| `mail.smtp.port` | SMTP Port |
+| `mail.smtp.auth.user` | SMTP Username |
+| `mail.smtp.auth.pass` | SMTP Password |
+| `mail.smtp.secure` | Whether SMTP is secured. |
+| `redis` | Redis connection object. |
 | `redis.url` | Should be left as default for Docker installations, else changed to `redis://localhost:6379/0`. |
 | `redis.password` | Redis password. |
-| `mongo.url` | For Docker replace temporary MongoDB musare user password with one specified in `.env`, and for non-Docker replace `@musare:27017` with `@localhost:27017`. |
-| `cookie.domain` | The ip or address you use to access the site, without protocols (http/https), so for example `localhost`. |
-| `cookie.secure` | Should be `true` for SSL connections, and `false` for normal http connections. |
-| `cookie.SIDname` | Name of the cookie stored for sessions. |
+| `mongo.user` | MongoDB username. |
+| `mongo.password` | MongoDB password. |
+| `mongo.host` | MongoDB host. |
+| `mongo.port` | MongoDB port. |
+| `mongo.database` | MongoDB database name. |
 | `blacklistedCommunityStationNames` | Array of blacklisted community station names. |
 | `featuredPlaylists` | Array of featured playlist id's. Playlist privacy must be public. |
+| `messages.accountRemoval` | Message to return to users on account removal. |
+| `siteSettings.christmas` | Whether to enable christmas theming. |
+| `footerLinks` | Add custom links to footer by specifying `"title": "url"`, e.g. `"GitHub": "https://github.com/Musare/Musare"`. You can disable about, team and news links (but not the pages themselves) by setting them to false, e.g. `"about": false`. |
+| `shortcutOverrides` | Overwrite keyboard shortcuts, for example `"editSong.useAllDiscogs": { "keyCode": 68, "ctrl": true, "alt": true, "shift": false, "preventDefault": true }`. |
+| `registrationDisabled` | If set to `true`, users can't register accounts. |
+| `sendDataRequestEmails` | If `true` all admin users will be sent an email if a data request is received. Requires mail to be enabled and configured. |
 | `skipConfigVersionCheck` | Skips checking if the config version is outdated or not. Should almost always be set to false. |
 | `skipDbDocumentsVersionCheck` | Skips checking if there are any DB documents outdated or not. Should almost always be set to false. |
-| `debug.stationIssue` | If set to `true` it will enable the `/debug_station` API endpoint on the backend, which provides information useful to debugging stations not skipping, as well as capure all jobs specified in `debug.captureJobs`.
+| `debug.stationIssue` | If set to `true` it will enable the `/debug_station` API endpoint on the backend, which provides information useful to debugging stations not skipping, as well as capture all jobs specified in `debug.captureJobs`.
 | `debug.traceUnhandledPromises` | Enables the trace-unhandled package, which provides detailed information when a promise is unhandled. |
 | `debug.captureJobs` | Array of jobs to capture for `debug.stationIssue`. |
+| `debug.git.remote` | Log the current Git repository's remote. |
+| `debug.git.remoteUrl` | Log the current Git repository's remote URL. |
+| `debug.git.branch` | Log the current Git repository's branch. |
+| `debug.git.latestCommit` | Log the current Git repository's latest commit hash. |
+| `debug.git.latestCommitShort` | Log the current Git repository's latest commit hash (short). |
+| `debug.version` | Log the current package.json version. |
 | `defaultLogging.hideType` | Filters out specified message types from log, for example `INFO`, `SUCCESS`, `ERROR` and `STATION_ISSUE`. |
 | `defaultLogging.blacklistedTerms` | Filters out messages containing specified terms from log, for example `success`. |
 | `customLoggingPerModule.[module].hideType` | Where `[module]` is a module name specify hideType as you would `defaultLogging.hideType` to overwrite default. |
 | `customLoggingPerModule.[module].blacklistedTerms` | Where `[module]` is a module name specify blacklistedTerms as you would `defaultLogging.blacklistedTerms` to overwrite default. |
-| `configVersion` | Version of the config. Every time the template changes, you should change your config accordingly and update the configVersion. |
-| `experimental.weight_stations` | Experimental option to use weights when autofilling stations, looking at the weight[X] tag for songs. If true, enables for all stations using default tag name. If an object, key msut b station id's, and if true enables for those stations with default weight tag name, or you can specify an alternative tag name by setting the value to a string. |
 | `experimental.weight_stations` | Experimental option to use weights when autofilling stations, looking at the weight[X] tag for songs. Must be an object, key must be station id's, value can be true or a string. If true, it uses tag name `weight`. If a string, it uses that string as the tag name. |
 | `experimental.queue_autofill_skip_last_x_played` | Experimental option to not autofill songs that were played recently. Must be an object, key must be station id's, value must be a number. The number equals how many songs it will consider recent and use when checking if it can autofill. |
 | `experimental.queue_add_before_autofilled` | Experimental option to have requested songs in queue appear before autofilled songs, based on the autofill number. Must be true or an object. If true, it's enabled for all stations. If an object, key must be station id's, value must be true to enable for that station. |
-| `experimental.disable_youtube_search` | Experimental option to disable YouTube search on the backend. If true, this option is enabled. |
-
-## Frontend
-
-Location: `frontend/dist/config/default.json`
-
-| Property | Description |
-| --- | --- |
-| `mode` | Should be either `development` or `production`. |
-| `backend.apiDomain` | Should be the url where the backend will be accessible from, usually `http://localhost/backend` for docker or `http://localhost:8080` for non-Docker. |
-| `backend.websocketsDomain` | Should be the same as the `apiDomain`, except using the `ws://` protocol instead of `http://` and with `/ws` at the end. |
-| `devServer.hmrClientPort` | Should be the port on which the frontend will be accessible from, usually port `80`, or `443` if using SSL. Only used when running in dev mode. |
-| `devServer.port` | Should be the port where Vite's dev server will be accessible from, should always be port `81` for Docker since nginx listens on port 80, and is recommended to be port `80` for non-Docker. Only used when running in dev mode. |
-| `frontendDomain` | Should be the url where the frontend will be accessible from, usually `http://localhost` for docker or `http://localhost:80` for non-Docker. |
-| `recaptcha.key` | ReCaptcha Site v3 key, obtained from [here](https://www.google.com/recaptcha/admin). |
-| `recaptcha.enabled` | Whether to enable ReCaptcha at email registration. |
-| `cookie.domain` | Should be the ip or address you use to access the site, without protocols (http/https), so for example `localhost`. |
-| `cookie.secure` | Should be `true` for SSL connections, and `false` for normal http connections. |
-| `cookie.SIDname` | Name of the cookie stored for sessions. |
-| `siteSettings.logo_white` | Path to the white logo image, by default it is `/assets/white_wordmark.png`. |
-| `siteSettings.logo_blue` | Path to the blue logo image, by default it is `/assets/blue_wordmark.png`. |
-| `siteSettings.logo_small` | Path to the small white logo image, by default it is `/assets/favicon/mstile-144x144.png`. |
-| `siteSettings.sitename` | Should be the name of the site. |
-| `siteSettings.footerLinks` | Add custom links to footer by specifying `"title": "url"`, e.g. `"GitHub": "https://github.com/Musare/Musare"`. You can disable about, team and news links (but not the pages themselves) by setting them to false, e.g. `"about": false`. |
-| `siteSettings.christmas` | Whether to enable christmas theming. |
-| `siteSettings.registrationDisabled` | If set to true, users can't register accounts. |
-| `messages.accountRemoval` | Message to return to users on account removal. |
-| `shortcutOverrides` | Overwrite keyboard shortcuts, for example `"editSong.useAllDiscogs": { "keyCode": 68, "ctrl": true, "alt": true, "shift": false, "preventDefault": true }`. |
-| `debug.git.remote` | Allow the website/users to view the current Git repository's remote. [^1] |
-| `debug.git.remoteUrl` | Allow the website/users to view the current Git repository's remote URL. [^1] |
-| `debug.git.branch` | Allow the website/users to view the current Git repository's branch. [^1] |
-| `debug.git.latestCommit` | Allow the website/users to view the current Git repository's latest commit hash. [^1] |
-| `debug.git.latestCommitShort` | Allow the website/users to view the current Git repository's latest commit hash (short). [^1] |
-| `debug.version` | Allow the website/users to view the current package.json version. [^1] |
-| `skipConfigVersionCheck` | Skips checking if the config version is outdated or not. Should almost always be set to false. |
-| `configVersion` | Version of the config. Every time the template changes, you should change your config accordingly and update the configVersion. |
+| `experimental.disable_youtube_search` | Experimental option to disable YouTube search. |
+| `experimental.registration_email_whitelist` | Experimental option to limit registration to users with an email matching any regex defined in an array. |
 | `experimental.changable_listen_mode` | Experimental option to allows users on stations to close the player. If true, enables for all stations. If an array of station id's, enable for just those stations. |
-| `experimental.disable_youtube_search` | Experimental option to disable YouTube search on the frontend. If true, this option is enabled. |
 | `experimental.media_session` | Experimental option to enable media session functionality. |
-
-[^1]: Requires a frontend restart to update. The data will be available from the frontend console and by the frontend code.
-
-## Docker Environment
-
-Location: `.env`
-
-In the table below the container host refers to the IP address that the docker
-container listens on, setting this to `127.0.0.1` for example will only expose
-the configured port to localhost, whereas setting to `0.0.0.0` will expose the
-port on all interfaces.
-
-The container port refers to the external docker container port, used to access
-services within the container. Changing this does not require any changes to
-configuration within container. For example setting the `MONGO_PORT` to `21018`
-will allow you to access the mongo service through that port, even though the
-application within the container is listening on `21017`.
-
-| Property | Description |
-| --- | --- |
-| `COMPOSE_PROJECT_NAME` | Should be a unique name for this installation, especially if you have multiple instances of Musare on the same machine. |
-| `RESTART_POLICY` | Restart policy for docker containers, values can be found [here](https://docs.docker.com/config/containers/start-containers-automatically/). |
-| `CONTAINER_MODE` | Should be either `prod` or `dev`.  |
-| `DOCKER_COMMAND` | Should be either `docker` or `podman`.  |
-| `BACKEND_HOST` | Backend container host. |
-| `BACKEND_PORT` | Backend container port. |
-| `FRONTEND_HOST` | Frontend container host. |
-| `FRONTEND_PORT` | Frontend container port. |
-| `FRONTEND_MODE` | Should be either `prod` or `dev`. |
-| `MONGO_HOST` | Mongo container host. |
-| `MONGO_PORT` | Mongo container port. |
-| `MONGO_ROOT_PASSWORD` | Password of the root/admin user for MongoDB. |
-| `MONGO_USER_USERNAME` | Application username for MongoDB. |
-| `MONGO_USER_PASSWORD` | Application password for MongoDB. |
-| `MONGO_DATA_LOCATION` | The location where MongoDB stores its data. Usually the `.db` folder inside the `Musare` folder. |
-| `MONGO_VERSION` | The MongoDB version to use for scripts and docker-compose. Must be numerical. Currently supported MongoDB versions are 4.0+. Always backup before changing this value. |
-| `REDIS_HOST` | Redis container host. |
-| `REDIS_PORT` | Redis container port. |
-| `REDIS_PASSWORD` | Redis password. |
-| `REDIS_DATA_LOCATION` | The location where Redis stores its data. Usually the `.redis` folder inside the `Musare` folder. |
-| `BACKUP_LOCATION` | Directory to store musare.sh backups. Defaults to `/backups` in script location. |
-| `BACKUP_NAME` | Name of musare.sh backup files. Defaults to `musare-$(date +"%Y-%m-%d-%s").dump`. |
+| `experimental.station_history` | Experimental feature to record playback history of stations, in addition to preventing recently played songs. |
+| `experimental.soundcloud` | Experimental SoundCloud integration. |
+| `experimental.spotify` | Experimental Spotify integration. |
 
 ## Docker-compose override
 
 You may want to override the docker-compose files in some specific cases.
 For this, you can create a `docker-compose.override.yml` file.
 
-### Run backend on its own domain
-
-One example usecase for the override is to expose the backend port so you can
-run it separately from the frontend. An example file for this is as follows:
+For example, to expose the backend port:
 
 ```yml
 services:

+ 9 - 17
.wiki/Installation.md

@@ -17,15 +17,10 @@ To update an existing installation please see [Upgrading](./Upgrading.md).
 
 1. `git clone https://github.com/Musare/Musare.git`
 2. `cd Musare`
-3. `cp backend/config/template.json backend/config/default.json` and configure
-as per [Configuration](./Configuration.md#Backend)
-4. `cp frontend/dist/config/template.json frontend/dist/config/default.json`
-and configure as per [Configuration](./Configuration.md#Frontend)
-5. `cp .env.example .env` and configure as per
-[Configuration](./Configuration.md#Docker-Environment).
-6. `./musare.sh build`
-7. `./musare.sh start`
-8. **(optional)** Register a new user on the website and grant the admin role
+3. [Configure](./Configuration.md)
+4. `./musare.sh build`
+5. `./musare.sh start`
+6. **(optional)** Register a new user on the website and grant the admin role
 by running `./musare.sh admin add USERNAME`.
 
 ### Fixing the "couldn't connect to docker daemon" error
@@ -59,13 +54,10 @@ by running `./musare.sh admin add USERNAME`.
 2. `cd Musare`
 3. [Setup MongoDB](#setting-up-mongodb)
 4. [Setup Redis](#setting-up-redis)
-5. `cp backend/config/template.json backend/config/default.json` and configure
-as per [Configuration](./Configuration.md#Backend)
-6. `cp frontend/dist/config/template.json frontend/dist/config/default.json`
-and configure as per [Configuration](./Configuration.md#Frontend)
-7. `cd frontend && npm install && cd ..`
-8. `cd backend && npm install && cd ..`
-9. Start services
+5. [Configure](./Configuration.md)
+6. `cd frontend && npm install && cd ..`
+7. `cd backend && npm install && cd ..`
+8. Start services
     - **Linux**
         1. Execute `systemctl start redis mongod`
         2. Execute `cd frontend && npm run dev` and
@@ -77,7 +69,7 @@ and configure as per [Configuration](./Configuration.md#Frontend)
             1. Run `startRedis.cmd` and `startMongo.cmd` to start Redis and Mongo.
             2. Execute `cd frontend && npm run dev` and
             `cd backend && npm run dev` separately.
-10. **(optional)** Register a new user on the website and grant the admin role
+9. **(optional)** Register a new user on the website and grant the admin role
 by running the following in the mongodb shell.
 
     ```bash

+ 9 - 12
.wiki/Upgrading.md

@@ -13,21 +13,19 @@ To install a new instance please see [Installation](./Installation.md).
 or database migrations, you will be notified.
     - To update configuration compare example configs against your own and
     add/update/remove any properties as needed. For more information on
-    properties see [Configuration](./Configuration.md). Frontend and backend
+    properties see [Configuration](./Configuration.md). Backend
     configuration updates always update the `configVersion` property.
-        - Backend, compare `backend/config/template.json` against
-        `backend/config/default.json`.
-        - Frontend, compare `frontend/dist/config/template.json` against
-        `frontend/dist/config/default.json`.
+        - Backend, compare `backend/config/default.json` against
+        `backend/config/local.json`.
         - Environment, compare `.env.example` against `.env`.
     - To migrate database;
         - `./musare.sh stop backend`
-        - Set `migration` to `true` in  `backend/config/default.json`
+        - Set `migration` to `true` in  `backend/config/local.json`
         - `./musare.sh start backend`.
         - Follow backend logs and await migration completion notice
         `./musare.sh attach backend`.
         - `./musare.sh stop backend`
-        - Set `migration` to `false` in  `backend/config/default.json`
+        - Set `migration` to `false` in  `backend/config/local.json`
         - `./musare.sh start backend`.
 
 ---
@@ -43,16 +41,15 @@ or database migrations, you will be notified.
 5. `cd ../backend && npm install`
 6. Compare example configs against your own and add/update/remove any properties
 as needed. For more information on properties see [Configuration](./Configuration.md).
-Frontend and backend configuration updates always update the `configVersion` property.
-    - Backend, compare `backend/config/template.json` against `backend/config/default.json`.
-    - Frontend, compare `frontend/dist/config/template.json` against `frontend/dist/config/default.json`.
+Backend configuration updates always update the `configVersion` property.
+    - Backend, compare `backend/config/default.json` against `backend/config/local.json`.
 7. Start MongoDB and Redis services.
 8. Run database migration;
-    - Set `migration` to `true` in  `backend/config/default.json`
+    - Set `migration` to `true` in  `backend/config/local.json`
     - Start backend service.
     - Follow backend logs and await migration completion notice.
     - Stop backend service.
-    - Set `migration` to `false` in  `backend/config/default.json`
+    - Set `migration` to `false` in  `backend/config/local.json`
 9. Start backend and frontend services.
 
 ## Upgrade/downgrade MongoDB

+ 2 - 2
backend/config/default.json

@@ -1,4 +1,5 @@
 {
+	"configVersion": 12,
 	"migration": false,
 	"secret": "default",
 	"port": 8080,
@@ -149,6 +150,5 @@
 		"station_history": false,
 		"soundcloud": false,
 		"spotify": false
-	},
-	"configVersion": 12
+	}
 }

+ 2 - 2
backend/config/template.json

@@ -1,4 +1,5 @@
 {
+	"configVersion": 12,
 	"migration": false,
 	"secret": "CHANGE_ME",
 	"url": {
@@ -26,6 +27,5 @@
 			},
 			"secure": true
 		}
-	},
-	"configVersion": 12
+	}
 }