Skip to content

Commit e8b1ade

Browse files
authored
docs: self hosted (#233)
1 parent 496f06c commit e8b1ade

File tree

4 files changed

+42
-58
lines changed

4 files changed

+42
-58
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ BundleMon helps you achieve that by constantly monitoring your bundle size on ev
2323
- Supports multiple CI
2424
- Integrates with Github, can post build status & comment with detailed information
2525
- History report - [example](https://app.bundlemon.dev/projects/60a928cfc1ab380009f5cc0b/reports?branch=main&resolution=days)
26+
- [Self hosted option](./docs/self-hosted/README.md)
2627

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

253254
## BundleMon free hosted service
254255

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

257258
Limitations of the free hosted service:
258259

apps/service/docs/self-hosted.md

Lines changed: 0 additions & 57 deletions
This file was deleted.

docs/self-hosted/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Self hosted BundleMon platform
2+
3+
## Running with Docker
4+
5+
```sh
6+
docker run --rm -p 8080:8080 -e MONGO_URL="mongodb://localhost:27017" ghcr.io/lironer/bundlemon-platform:v1
7+
```
8+
9+
Full Docker compose example [here](./docker-compose.yaml).
10+
11+
You can also run with env var `SHOULD_SERVE_WEBSITE=false` to disable serving the website.
12+
13+
**Full details on all environment variables [here](../../apps/service/README.md).**
14+
15+
## MongoDB setup
16+
17+
Create your MongoDB, you can either create one in docker, your own machine or host on another service like MongoDB Atlas.
18+
19+
> you can create a free MongoDB [here](https://www.mongodb.com) (500 MB free).
20+
21+
## Setup BundleMon CLI
22+
23+
Set env var `BUNDLEMON_SERVICE_URL=https://your-bundlemon-service.domain/api` in your CI/CD.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
bundlemon:
3+
image: ghcr.io/lironer/bundlemon-platform:v1
4+
ports:
5+
- '8080:8080'
6+
environment:
7+
MONGO_URL: mongodb://mongo:27017
8+
depends_on:
9+
- mongo
10+
11+
mongo:
12+
image: mongo:7.0
13+
ports:
14+
- '27017:27017'
15+
logging:
16+
driver: 'none'
17+
command: --quiet

0 commit comments

Comments
 (0)