Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
upright (0.2.0)
upright (0.3.0)
cgi
frozen_record
geared_pagination
Expand Down Expand Up @@ -818,7 +818,7 @@ CHECKSUMS
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
upright (0.2.0)
upright (0.3.0)
uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844
validate_url (1.0.15) sha256=72fe164c0713d63a9970bd6700bea948babbfbdcec392f2342b6704042f57451
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ scrape_configs:
- job_name: "upright"
scrape_interval: 5s
static_configs:
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The development Prometheus config now targets host.docker.internal, which is correct for Dockerized Prometheus scraping a host-run Rails app, but it diverges from the localhost:9394 example in the README. Consider adding an explanatory comment here (or updating the docs) to make it clear which target to use in each setup.

Suggested change
static_configs:
static_configs:
# Use host.docker.internal when Prometheus runs in Docker and Rails runs on the host.
# If Prometheus also runs directly on the host, use localhost:9394 instead.

Copilot uses AI. Check for mistakes.
- targets: ["localhost:9394"]
- targets: ["host.docker.internal:9394"]
5 changes: 4 additions & 1 deletion lib/generators/upright/install/templates/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ services:
prometheus:
image: prom/prometheus:v3.4.1
container_name: <%= app_name %>-prometheus
network_mode: host
ports:
- "9090:9090"
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template uses extra_hosts: host.docker.internal:host-gateway, which requires Docker Engine 20.10+ (and a Compose implementation that supports host-gateway). Please document this requirement in the generated compose (or nearby docs) and provide a clear fallback for older Linux Docker setups to prevent hard-to-diagnose failures when bringing the stack up.

Suggested change
- "9090:9090"
- "9090:9090"
# Requires Docker Engine 20.10+ and a Compose implementation that supports
# the special `host-gateway` value in `extra_hosts`.
#
# If `docker compose up` fails on an older Linux Docker setup, replace
# `host-gateway` below with your Docker host gateway IP (for example
# `172.17.0.1`, adjusted for your environment).

Copilot uses AI. Check for mistakes.
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./config/prometheus/development/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./config/prometheus/rules:/etc/prometheus/rules:ro
Expand Down
2 changes: 1 addition & 1 deletion lib/upright/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Upright
VERSION = "0.2.0"
VERSION = "0.3.0"
end
Comment on lines 1 to 3
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description focuses on docker-compose/macOS fixes, but it also bumps the gem version to 0.3.0. Please either mention the version bump explicitly in the PR description (and ensure release notes/changelog capture this docker-compose change), or split the version bump into a separate release PR to keep scope clear.

Copilot uses AI. Check for mistakes.
2 changes: 1 addition & 1 deletion test/dummy/config/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ scrape_configs:
- job_name: "upright"
scrape_interval: 5s
static_configs:
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This scrape target is now Docker-specific (host.docker.internal). If someone runs Prometheus directly on the host (not in Docker), this hostname won’t resolve. Consider adding a brief comment in this config (or maintaining a separate non-Docker example) to clarify when host.docker.internal vs localhost should be used.

Suggested change
static_configs:
static_configs:
# Use `host.docker.internal` when Prometheus runs in Docker.
# If Prometheus runs directly on the host, use `localhost:9394` instead.

Copilot uses AI. Check for mistakes.
- targets: ["localhost:9394"]
- targets: ["host.docker.internal:9394"]
8 changes: 6 additions & 2 deletions test/dummy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ services:
prometheus:
image: prom/prometheus:v3.4.1
container_name: upright-prometheus
network_mode: host
ports:
- "9090:9090"
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra_hosts: host.docker.internal:host-gateway relies on Docker Engine 20.10+ (and a Compose implementation that supports the special host-gateway value). Consider adding an inline comment or note in the dummy compose file about this minimum requirement and the fallback (upgrade Docker or switch back to network_mode: host on Linux) to avoid confusing startup errors on older Docker installs.

Suggested change
- "9090:9090"
- "9090:9090"
# `host-gateway` requires Docker Engine 20.10+ and a Compose implementation
# that supports the special value. On older Linux Docker setups, upgrade
# Docker/Compose or switch back to `network_mode: host`.

Copilot uses AI. Check for mistakes.
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./config/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./config/prometheus/rules:/etc/prometheus/rules:ro
Expand All @@ -16,7 +19,8 @@ services:
alertmanager:
image: prom/alertmanager:v0.28.1
container_name: upright-alertmanager
network_mode: host
ports:
- "9093:9093"
volumes:
- ./config/alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro
- alertmanager_data:/alertmanager
Expand Down
Loading