Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hschne committed Oct 15, 2024
1 parent a243515 commit 31067f3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,28 @@ Visit [localhost:4567](http://localhost:4567) to check your system data. To see
Puny Monitor was made with [Kamal](https://kamal-deploy.org/) and [Ruby on Rails](https://rubyonrails.org/) in mind. It is recommended that you deploy it as an accessory to your application. Add the following lines to `config/deploy.yml`:

```
TODO
accessories:
puny-monitor:
image: hschne/puny-monitor:latest
host: 159.69.18.121
port: 4567
volumes:
- /:/host:ro,rslave
- puny-data:/puny-monitor/db
aliases:
shell: app exec --interactive --reuse "bash"
add-monitoring-to-proxy: |
server exec docker exec kamal-proxy kamal-proxy deploy puny-monitor
--target "<your-service-name>-puny-monitor:4567"
--host "puny-monitor.<your-domain>"
--tls
```

Then run `kamal-proxy` to point to Puny Monitor:

```
TODO
kamal add-monitoring-to-proxy
```

## Why Puny Monitor?
Expand Down
4 changes: 4 additions & 0 deletions app/puny_monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class App < Sinatra::Base
erb :index, locals: {}
end

get "/up" do
200
end

get "/data/cpu" do
content_type :json
end_time = Time.now
Expand Down

0 comments on commit 31067f3

Please sign in to comment.