Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ RUN mkdir -p /etc/ocap /usr/local/ocap/data /var/lib/ocap/db /var/lib/ocap/maps
ENV OCAP_AMMO=/usr/local/ocap/ammo \
OCAP_DATA=/var/lib/ocap/data \
OCAP_DB=/var/lib/ocap/db/data.db \
OCAP_FONTS=/usr/local/ocap/fonts \
OCAP_LISTEN=0.0.0.0:5000 \
OCAP_MAPS=/var/lib/ocap/maps \
OCAP_MARKERS=/usr/local/ocap/markers
EXPOSE 5000/tcp
VOLUME /var/lib/ocap/db /var/lib/ocap/maps /var/lib/ocap/data

COPY assets/ammo /usr/local/ocap/ammo
COPY assets/fonts /usr/local/ocap/fonts
COPY assets/markers /usr/local/ocap/markers
COPY --from=builder /go/pkg/ocap/app /usr/local/ocap/app

Expand Down
6 changes: 6 additions & 0 deletions internal/fonts/fonts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package fonts

import "embed"

//go:embed all:glyphs
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The go:embed directive all:glyphs embeds the glyphs directory itself. This means file paths within GlyphsFS will be prefixed with glyphs/ (e.g., glyphs/OpenSans-Bold/0-255.pbf).

Given the test plan's curl command, the server is expected to serve files from /fonts/ without this glyphs/ prefix, which would lead to 404 errors.

To fix this, you can adjust the embed pattern to strip the glyphs/ prefix from the embedded file paths.

Suggested change
//go:embed all:glyphs
//go:embed all:glyphs/*

var GlyphsFS embed.FS
Loading
Loading