This server is the API for MapColonies configuration management system. It is responsible for managing the configuration of the services in the system.
The server depends on the schemas package to load and validate the configuration schemas. The schemas package is a separate package and the server should be updated when a new version of the schemas package is released.
To run the server locally the following steps are required.
- Clone the repository
git clone [email protected]:MapColonies/config-server.git
- Install the dependencies
npm install
- create a local configuration file under the config folder named
local.json
and fill it with the required configuration. Check theconfig/default.json
file for the required configuration. - Run the migrations
npm run migration:run
- Run the server
npm run start:dev
To create a new migration file run the following command:
npm run migration:create
To run the tests run the following command:
npm run test
Make sure you have set the testing configuration.
The server is deployed using docker and a helm chart. To build the docker image run the following command:
docker build -t <your-org>/config-server:<tag> .
If needed, it's possible to run the migrations straight from the docker image by running the following command:
docker run --rm <your-org>/config-server:<tag> node ./db/runMi
grations.js
Don't forget to set the required environment variables.