From 5c1c2d4df78ab0320b729057a4018ede8eb19c91 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 13 Aug 2024 13:29:12 -0700 Subject: [PATCH 1/3] Added better quickstart for devs --- README.md | 60 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7c4ed8c25..0934fcdc1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ ![](https://img.shields.io/github/issues-pr/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/issues/bluewave-labs/bluewave-uptime) -

BlueWave Uptime

An open source server monitoring application

@@ -26,29 +25,31 @@ BlueWave Uptime is an open source server monitoring application used to track th - [ ] Scheduled maintenance (in the works) **Roadmap (short term):** + - [ ] Memory, disk and CPU monitoring - [ ] 3rd party integrations - [ ] DNS monitoring - [ ] SSL monitoring **Roadmap (long term):** + - [ ] Status pages ## Tech stack -* [ReactJs](https://react.dev/) -* [MUI (React framework)](https://mui.com/) -* [Node.js](https://nodejs.org/en) -* [MongoDB](https://mongodb.com) +- [ReactJs](https://react.dev/) +- [MUI (React framework)](https://mui.com/) +- [Node.js](https://nodejs.org/en) +- [MongoDB](https://mongodb.com) ## Contributing We love contributors. Here's how you can contribute: -* Check [Contributor's guideline](https://github.com/bluewave-labs/bluewave-uptime/blob/master/CONTRIBUTING.md). -* Have a look at our Figma designs [here](https://www.figma.com/design/RPSfaw66HjzSwzntKcgDUV/Uptime-Genie?node-id=0-1&t=WqOFv9jqNTFGItpL-1). We encourage you to copy to your own Figma page, then work on it as it is read-only. -* Open an issue if you believe you've encountered a bug -* Make a pull request to add new features/make quality-of-life improvements/fix bugs. +- Check [Contributor's guideline](https://github.com/bluewave-labs/bluewave-uptime/blob/master/CONTRIBUTING.md). +- Have a look at our Figma designs [here](https://www.figma.com/design/RPSfaw66HjzSwzntKcgDUV/Uptime-Genie?node-id=0-1&t=WqOFv9jqNTFGItpL-1). We encourage you to copy to your own Figma page, then work on it as it is read-only. +- Open an issue if you believe you've encountered a bug +- Make a pull request to add new features/make quality-of-life improvements/fix bugs. @@ -58,12 +59,12 @@ Made with [contrib.rocks](https://contrib.rocks). ![Alt](https://repobeats.axiom.co/api/embed/c35d999c82dbb31e967427ea4166c14da4172e73.svg "Repobeats analytics image") - ## Getting Started - Clone this repository to your local machine -1. [Docker Quickstart](#docker-quickstart) +1. [Quickstart for Developers](#dev-quickstart) +1. [Docker Compose](#docker-compose) 1. [Installation (Client)](#client) 1. [Configuration(Client)](#config-client) - [Environment](#env-vars-client) @@ -117,9 +118,41 @@ Made with [contrib.rocks](https://contrib.rocks). --- -### Docker Quick Start +#### Quickstart for Developers -#### Docker Quickstart +# PLEASE MAKE SURE YOU CD TO THE SPECIFIED DIRECTORIES + +##### Cloning and Initial Setup + +1. Clone this repository +2. Checkout the `develop` branch `git checkout develop` + +##### Docker Images Setup + +3. CD to the `Docker` directory +4. Run `docker run -d -p 6379:6379 -v $(pwd)/redis/data:/data --name uptime_redis uptime_redis` +5. Run `docker run -d -p 27017:27017 -v $(pwd)/mongo/data:/data/db --name uptime_database_mongo uptime_database_mongo` + +##### Server Setup + +6. CD to `Server` directory, run `npm install` +7. While in `Server` directory, create a `.env` file with the [required environmental variables](#env-vars-server) +8. While in the `Server` directory, run `npm run dev` + +##### Client Setup + +9. CD to `Client` directory `run npm install` +10. While in the `Client` directory, create a `.env` file with the [required environmental variables](#env-vars-client) +11. While in the `Client` cirectory run `npm run dev` + +##### Access Application + +12. Client is running at `localhost:5173` +13. Server is running at `localhost:5000` + +--- + +#### Docker Compose The fastest way to start the application is to use our Dockerfiles and [Docker Compose](https://docs.docker.com/compose/). @@ -2112,4 +2145,3 @@ const myRoute = async(req, res, next) => { ``` Errors should not be handled at the controller level and should be left to the middleware to handle. - From 4fac8377021e670520c14361c13b8dd664ec9604 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 13 Aug 2024 13:46:25 -0700 Subject: [PATCH 2/3] Fix docker-compose instructions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0934fcdc1..f62640e93 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ Made with [contrib.rocks](https://contrib.rocks). #### Quickstart for Developers -# PLEASE MAKE SURE YOU CD TO THE SPECIFIED DIRECTORIES +MAKE SURE YOU CD TO THE SPECIFIED DIRECTORIES AS PATHS IN COMMANDS ARE RELATIVE ##### Cloning and Initial Setup @@ -176,7 +176,7 @@ SYSTEM_EMAIL_ADDRESS= SYSTEM_EMAIL_PASSWORD= ``` -3. In the `Docker` directory, create a `client.env` file with the [required environtmental variables](#env-vars-client) for the client. Sample file: +3. In the `Client` directory, create a `client.env` file with the [required environtmental variables](#env-vars-client) for the client. Sample file: ``` VITE_APP_API_BASE_URL="http://localhost:5000/api/v1" From 8987f4c72a6fa9489b7f0f4e75c4ec4dc31bec59 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 13 Aug 2024 13:46:59 -0700 Subject: [PATCH 3/3] Fixed port --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f62640e93..2d0db36fc 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ VITE_APP_API_BASE_URL="http://localhost:5000/api/v1" 4. In the `Docker` directory run `docker compose up` to run the `docker-compose.yaml` file and start all four images. -That's it, the application is ready to use on port 5173. +That's it, the application is ready to use on port 80.
### Client