--- icon: sign-posts-wrench --- # Installing Uptime Manager ## Quickstart for users (quick method) 1. Download our [Docker compose file](https://github.com/bluewave-labs/bluewave-uptime/blob/develop/Docker/dist/docker-compose.yaml) 2. Run `docker compose up` to start the application 3. Now the application is running at `http://localhost` --- ## Quickstart for developers {% hint style="info" %} Make sure you change the directory to the specified directories, as paths in commands are relative. {% endhint %} ### Cloning and initial setup 1. Clone this repository. 2. Checkout the `develop` branch `git checkout develop` ### Setting up Docker images 3. Change directory to the `Docker/dev` directory 4. Build the docker images by running the `build_images.sh` script 5. Run `docker run -d -p 6379:6379 -v $(pwd)/redis/data:/data --name uptime_redis uptime_redis` 6. 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, and 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` directory run `npm run dev` ### Access the application 12. Client is now running at `localhost:5173` 13. Server is now running at `localhost:5000` --- ## Manual installation ### Client installation 1. Change directory to the `Client` directory 2. Install all dependencies by running `npm install` 3. Add a `.env` file to the `Client` directory with the following options: #### Environment variables | ENV Variable Name | Required/Optional | Type | Description | Accepted Values | | --------------------- | ----------------- | --------- | ------------------ | ---------------------------------- | | VITE_APP_API_BASE_URL | Required | `string` | Base URL of server | {host}/api/v1 | | VITE_APP_LOG_LEVEL | Optional | `string` | Log level | `"none"`\|`"error"` \| `"warn"` \| | | VITE_APP_DEMO | Optional | `boolean` | Demo server or not | `true`\|`false` \| | #### Starting the Client development server 1. Run `npm run dev` to start the development server. ### Server Installation 1. Change the directory to the `Server` directory 2. Install all dependencies by running `npm install` 3. Add a `.env` file to the `Server` directory with the following options: #### Environment variables Configure the server with the following environmental variables:
| ENV Variable Name | Required/Optional | Type | Description | Accepted Values |
|---|---|---|---|---|
| CLIENT_HOST | Required | string | Frontend Host | |
| JWT_SECRET | Required | string | JWT secret | |
| DB_TYPE | Optional | string | Specify DB to use | MongoDB | FakeDB |
| DB_CONNECTION_STRING | Required | string | Specifies URL for MongoDB Database | |
| PORT | Optional | integer | Specifies Port for Server | |
| LOGIN_PAGE_URL | Required | string | Login url to be used in emailing service | |
| REDIS_HOST | Required | string | Host address for Redis database | |
| REDIS_PORT | Required | integer | Port for Redis database | |
| TOKEN_TTL | Optional | string | Time for token to live | In vercel/ms format https://github.com/vercel/ms |
| PAGESPEED_API_KEY | Optional | string | API Key for PageSpeed requests | |
| SYSTEM_EMAIL_HOST | Required | string | Host to send System Emails From | |
| SYSTEM_EMAIL_PORT | Required | number | Port for System Email Host | |
| SYSTEM_EMAIL_ADDRESS | Required | string | System Email Address | |
| SYSTEM_EMAIL_PASSWORD | Required | string | System Email Password |