-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
78 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Monitor | ||
|
||
## Overview | ||
|
||
In the `n8n-shortlink-network` network, we have these monitoring-related services running: | ||
|
||
- http://n8n-shortlink:3001 → Shortlink API exposes Prometheus metrics, some of them derived from [expvar](https://pkg.go.dev/expvar). | ||
- http://prometheus:9090 → [Prometheus](https://prometheus.io/) to scrape and aggregate metrics. | ||
- http://node_exporter:9100 → [Node Exporter](https://github.com/prometheus/node_exporter) to expose host metrics. | ||
- http://cadvisor:8080 → [cAdvisor](https://github.com/google/cadvisor) to expose container metrics. | ||
- http://loki:3100 → [Loki](https://grafana.com/oss/loki/) to aggregate logs from Promtail. | ||
- [Promtail](https://grafana.com/docs/loki/latest/send-data/promtail/) (no port exposed) to push logs to Loki. | ||
- http://grafana:3000 → [Grafana](https://grafana.com/) to visualize metrics and logs. | ||
|
||
Prometheus aggregates metrics from itself, the API, node exporter, cAdvisor. Loki aggregates logs from Promtail, which pushes them from the API and from the backup cronjob. | ||
|
||
Outside the network, to the reverse proxy, these services are available as `localhost:{port}`. | ||
|
||
## TODOs | ||
|
||
- [ ] Set up Grafana dashboards | ||
- [ ] Set up UptimeRobot or Checkly | ||
- [ ] Set up https://healthchecks.io/ for backup cronjob | ||
- [ ] Monitor DB | ||
- [ ] Makefile commands for server logs | ||
- [ ] Makefile commands for backups | ||
- [ ] Makefile command for Sentry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,41 @@ | ||
# Release | ||
|
||
Pull latest changes: | ||
Ensure local and remote `master` branches are in sync: | ||
|
||
```sh | ||
git pull origin master | ||
git fetch origin | ||
git status | ||
# -> Your branch is up to date with 'origin/master'. | ||
``` | ||
|
||
Create tag (following semver) and push it: | ||
|
||
```sh | ||
git tag v1.0.0 | ||
git push origin v1.0.0 | ||
``` | ||
``` | ||
|
||
Monitor the release on GitHub: | ||
|
||
- https://github.com/ivov/n8n-shortlink/actions/workflows/release-on-tag-push.yml | ||
|
||
On completion, this release is listed as `latest` on GHCR: | ||
|
||
- https://github.com/ivov/n8n-shortlink/pkgs/container/n8n-shortlink | ||
|
||
Deploy the release to production: | ||
|
||
```sh | ||
ssh shortlink_vps | ||
|
||
COMPOSE_PROJECT_NAME=n8n_shortlink docker-compose --file deploy/docker-compose.monitoring.yml down | ||
COMPOSE_PROJECT_NAME=n8n_shortlink docker-compose --file deploy/docker-compose.yml down | ||
deploy/scripts/start-services.sh | ||
``` | ||
|
||
## TODOs | ||
|
||
- [ ] Shorten build time for `release-on-tag-push.yml` | ||
- [ ] Upgrade dependencies in `release-on-tag-push.yml` | ||
- [ ] Add GitHub release to `release-on-tag-push.yml` | ||
- [ ] Incorporate `check-build-health.yml` into `release-on-tag-push.yml` |