chore: add docker-compose for local VictoriaLogs instance #280
No reviewers
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills!280
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/2026-09-18/add-victorialogs-docker-compose"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds
extensions/victorialogs/docker-compose.ymlfor running a local VictoriaLogs instance, plus a short "Running VictoriaLogs locally" section in the extension README pointing at it.Why
The extension defaults to
http://localhost:9428but the repo gave you no way to get an instance there. The README's manual smoke test used a baredocker run, which loses all ingested logs on container recreation and doesn't come back after a host restart.The compose file fixes both:
restart: unless-stopped— returns with the Docker engine after a reboot, but an explicitdocker compose stopstays stopped (unlikealways)./victoria-logs-data— the image's default data path is otherwise ephemeral.--retentionPeriod=7dstated explicitly rather than left implicit, so the local retention window is visible.How tested
Against a real instance on this machine:
docker compose config -q— validdocker compose up -d— container healthy,GET /health→ 200/insert/jsonline→ 200logs_searchwithservice:checkoutreturned both lines through the extensionOut of scope notes
The README claims
VICTORIALOGS_URLcan be set in a.envfile, butsrc/env.tsonly readsprocess.env— unlike the siblingpostgres/mongodbextensions, which parse.envviadotenv. A.enventry is silently ignored today. Left alone here; worth its own PR to either fix the README or adddotenv.parse.@ -0,0 +1,20 @@services:victorialogs:image: victoriametrics/victoria-logs:latestcan we pin the version rather than use latest
Pushed
45a66fa— pinned the image tovictoriametrics/victoria-logs:v1.52.0instead of:latest, so a rebuild can't silently change the server version the extension is tested against.v1.52.0 confirmed as latest three ways: GitHub
releases/latest, the digest behind thelatestDocker tag, and the running container reportingtags-v1.52.0. Worth notingv1.51.1was published later (2026-08-18 vs 2026-07-16) — it's a patch backport on the 1.51 line, not a newer release, so tag recency alone would have picked the wrong one.Re-verified after the change:
docker compose config -qvalid, container recreated on the pinned tag,/health→ 200, andlogs_searchstill returned the two sample lines ingested before the recreate — which incidentally confirms the named volume survives container replacement, not just restarts.The README's standalone
docker runin the manual smoke test still uses:latest. Pre-existing and outside this change, so left alone.