Skip to content

Commit

Permalink
docs: self hosted (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
LironEr authored Feb 21, 2025
1 parent 496f06c commit e8b1ade
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 58 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ BundleMon helps you achieve that by constantly monitoring your bundle size on ev
- Supports multiple CI
- Integrates with Github, can post build status & comment with detailed information
- History report - [example](https://app.bundlemon.dev/projects/60a928cfc1ab380009f5cc0b/reports?branch=main&resolution=days)
- [Self hosted option](./docs/self-hosted/README.md)

<p align="middle">
<img src="./assets/history-hover-commit.png" alt="History report - specific commit" height="200px" />
Expand Down Expand Up @@ -252,7 +253,7 @@ In order to get BundleMon to work you'll need to set these environment variables

## BundleMon free hosted service

By default BundleMon is running on a free hosted server, you can also run BundleMon [on your server](./service/docs/self-hosted.md).
By default BundleMon is running on a free hosted server, you can also run BundleMon [on your server](./docs/self-hosted/README.md).

Limitations of the free hosted service:

Expand Down
57 changes: 0 additions & 57 deletions apps/service/docs/self-hosted.md

This file was deleted.

23 changes: 23 additions & 0 deletions docs/self-hosted/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Self hosted BundleMon platform

## Running with Docker

```sh
docker run --rm -p 8080:8080 -e MONGO_URL="mongodb://localhost:27017" ghcr.io/lironer/bundlemon-platform:v1
```

Full Docker compose example [here](./docker-compose.yaml).

You can also run with env var `SHOULD_SERVE_WEBSITE=false` to disable serving the website.

**Full details on all environment variables [here](../../apps/service/README.md).**

## MongoDB setup

Create your MongoDB, you can either create one in docker, your own machine or host on another service like MongoDB Atlas.

> you can create a free MongoDB [here](https://www.mongodb.com) (500 MB free).
## Setup BundleMon CLI

Set env var `BUNDLEMON_SERVICE_URL=https://your-bundlemon-service.domain/api` in your CI/CD.
17 changes: 17 additions & 0 deletions docs/self-hosted/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
services:
bundlemon:
image: ghcr.io/lironer/bundlemon-platform:v1
ports:
- '8080:8080'
environment:
MONGO_URL: mongodb://mongo:27017
depends_on:
- mongo

mongo:
image: mongo:7.0
ports:
- '27017:27017'
logging:
driver: 'none'
command: --quiet

0 comments on commit e8b1ade

Please sign in to comment.