A web application that provides an interface to search the Brazilian FIPE vehicle price table
9.3K
A lightweight web application to search the Brazilian FIPE vehicle price table (cars, motorcycles and trucks), shipped as a single, self-contained Go binary in a small, secure, multi-arch Docker image.
Source code: https://github.com/aeciopires/gofipe

docker pull aeciopires/gofipe:latest
docker run -d -p 8080:8080 --rm --name gofipe aeciopires/gofipe:latest
Then open http://localhost:8080 in your browser.
Recommended for production — see the CHANGELOG.
Platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6 (runs on servers, Apple Silicon and Raspberry Pi).
400/404/429/502/504) without leaking internal details.SIGTERM (readiness switches to 503 and the server drains for SHUTDOWN_DELAY)./health/live (liveness/startup), /health/ready (readiness) and /health (Docker HEALTHCHECK).log/slog, with trace_id/span_id correlation and a JSON access log per request.OTEL_EXPORTER_OTLP_ENDPOINT variable.go:embed — no extra files needed.10001), compatible with a read-only root filesystem, scanned with Trivy.docker run -d -p 8080:8080 --rm --name gofipe aeciopires/gofipe:latest
| What | URL |
|---|---|
| Web UI | http://localhost:8080 |
| Prometheus metrics | http://localhost:8080/metrics |
| Liveness | http://localhost:8080/health/live |
| Readiness | http://localhost:8080/health/ready |
Follow the JSON logs:
docker logs -f gofipe
Use a different port:
docker run -d -p 9000:9000 -e PORT=9000 --rm --name gofipe aeciopires/gofipe:latest
The public FIPE API works without a key. A subscription token from https://fipe.online raises rate limits and allows a longer price history:
docker run -d -p 8080:8080 --rm --name gofipe \
-e FIPE_API_TOKEN="<your-token>" \
aeciopires/gofipe:latest
services:
gofipe:
image: aeciopires/gofipe:latest
container_name: gofipe
restart: unless-stopped
ports:
- "8080:8080"
environment:
- PORT=8080
# - FIPE_API_TOKEN=<your-token>
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
docker compose up -d
Want metrics, logs and traces out of the box? The repository includes a full local observability stack (OpenTelemetry Collector, Prometheus, Loki, Tempo, Jaeger and Grafana with provisioned dashboards):
git clone https://github.com/aeciopires/gofipe.git
cd gofipe/app
docker compose up -d --build
Grafana will be available at http://localhost:3000 (admin / admin), with dashboards in the gofipe folder.
Point the container to any OTLP/HTTP endpoint (OpenTelemetry Collector, Tempo, Jaeger, etc.):
docker run -d -p 8080:8080 --rm --name gofipe \
-e OTEL_EXPORTER_OTLP_ENDPOINT="http://otel-collector:4318" \
-e OTEL_SERVICE_NAME="gofipe" \
aeciopires/gofipe:latest
git clone https://github.com/aeciopires/gofipe.git
cd gofipe/helm-chart
helm upgrade --install gofipe . --namespace gofipe --create-namespace --wait
kubectl port-forward svc/gofipe 8080:80 -n gofipe
The chart requires Helm 4 and Kubernetes >= 1.29. See the chart README for all options (Ingress, HPA, PodDisruptionBudget, ServiceMonitor, etc.).
| Variable | Default | Description |
|---|---|---|
PORT | 8080 | HTTP port the server listens on. |
FIPE_BASE_URL | https://fipe.parallelum.com.br/api/v2 | Base URL of the FIPE API v2. |
FIPE_API_TOKEN | (empty) | Optional subscription token from https://fipe.online (sent as X-Subscription-Token). |
SHUTDOWN_DELAY | 0s | Time to keep serving after SIGTERM while /health/ready returns 503 (e.g. 5s). |
OTEL_EXPORTER_OTLP_ENDPOINT | (empty) | OTLP/HTTP endpoint. When set, traces and logs are exported with OpenTelemetry. |
OTEL_SERVICE_NAME | gofipe | Service name reported in traces and logs. |
OTEL_RESOURCE_ATTRIBUTES | (empty) | Extra resource attributes (e.g. deployment.environment.name=prod). |
OTEL_SDK_DISABLED | false | Set to true to disable OpenTelemetry export. |
System
| Method | Endpoint | Description |
|---|---|---|
GET | / | Web UI. |
GET | /health | {"status": "ok"} — used by the Docker HEALTHCHECK. |
GET | /health/live | Liveness: {"status": "ok"}. |
GET | /health/ready | Readiness: {"status": "ok"}, or 503 {"status": "unavailable"} while starting/shutting down. |
GET | /metrics | Prometheus / OpenMetrics format (with exemplars). |
Business API
| Method | Endpoint | Query parameters | Description |
|---|---|---|---|
GET | /api/brands | type (cars, motorcycles, trucks; default cars) | Lists brands. |
GET | /api/models | type, brandId | Lists models of a brand. |
GET | /api/years | type, brandId, modelId | Lists available years of a model. |
GET | /api/price | type, brandId, modelId, yearId | Returns the current FIPE price. |
GET | /api/priceHistory | type, brandId, modelId, yearId, months (1–24, default 12) | Returns {"history": [...]}, newest first. |
Example:
curl "http://localhost:8080/api/brands?type=cars"
| Metric | Type | Description |
|---|---|---|
fipe_http_requests_total | Counter | HTTP requests by route and method. |
fipe_http_request_duration_seconds | Histogram | Request latency by route, method and status code, with trace_id exemplars. |
fipe_search_stats | Counter | Searches by brand, model and year. |
fipe_price_min / fipe_price_max | Gauge | Lowest / highest price observed. |
fipe_fuel_count | Counter | Searches by fuel type. |
fipe_brand_search_count | Counter | Searches by brand. |
Standard Go runtime and process metrics are also exposed.
golang Alpine image (multi-stage).10001.8080.HEALTHCHECK on /health.--read-only works.golangci-lint and govulncheck.If this project is useful to you, please give it a ⭐ on GitHub!
Released under the GNU General Public License v3.0.
Content type
Image
Digest
sha256:147b8ea48…
Size
10.3 MB
Last updated
2 days ago
docker pull aeciopires/gofipe