Knowzone is a knowledge sharing application. You can share your recent bugfixes or any new tips with others.
Create Post | Browse & Search Posts |
---|---|
-
We started this project to practice MERN stack and k8s. As we move on the project, we came up with new ideas to make the application more useful. If you want to help us you can contribute to the repository.
-
Knowzone is not available as a service, but you can find instructions for running it locally or on Azure below.
-
Install Node.js, version: 14.17.4
-
Install npm
Note: You may not have to install npm separately but make sure that npm version is 7.20.3 if it comes with Node installation.
Check the installed version of npm.
npm -v
If npm installed on your development environment already, you can update it to a specific version.
npm install -g npm@7.20.3
-
Install MongoDB Community Edition and make sure that you are able to run mongo shell with mongosh command in a terminal after the installation. Otherwise, you may need to install separately. Details
-
Install MongoDB Compass. This is a nice desktop application for MongoDB. Note: This, may already come with the MongoDB Community Installer.
cd server
Note: Install dependencies if you run the application for the first time. Otherwise, you can skip this step.
npm install
Run the application on your development environment.
# This will execute the command corresponding to the dev property
# under the scripts object in server/package.json
npm run dev
See the details of the architecture used in the Node.js project.
cd web
Install dependencies.
npm install
Run the application.
npm start
Tested on Linux (Ubuntu), macOS, and Windows.
For Windows, running the cluster outside of WSL can cause performance issues. Install the tools in WSL and run the cluster in WSL.
-
- Only the Docker CLI is required since we are using minikube's internal registry. If you are using Docker Desktop, you can stop Docker daemon by quitting the application.
-
- Since we are using minikube, you can skip these steps in the Tilt installation:
- In the preferences, click Enable Kubernetes
- Make Docker for Windows (or Mac) your local Kubernetes cluster: kubectl config use-context docker-desktop
- Since we are using minikube, you can skip these steps in the Tilt installation:
Make sure they are in the path by running:
docker --version
kubectl version --client
minikube version
tilt version
git --version
cd infra
./init-local.sh run
Startup script is divided into 4 steps:
- Create a minikube cluster
- Generate Kubernetes manifests
- Deploy secret and MongoDB operator
- Run Tilt developer environment
You can quit Tilt by pressing Ctrl-C. This does not remove the environment, you can start the development environment again with tilt up
. If you want to remove the whole infrastructure, run ./init-local.sh clean
. This tears down the minikube cluster, removes the generated manifests and the cloned MongoDB repository.
Please refer the guide inside infra directory.