forgejo-stlview/docker-compose.example.yml
butterrobot 17a64d6a46 Initial import of the Forgejo STL viewer setup
Files are copied verbatim from the running deployment at git.nakama.town,
except footer.tmpl, which uses {{AppSubUrl}} rather than a hardcoded /assets
path (identical output when Forgejo is served at the root).

The two three.js example modules are patched to import the build by relative
path instead of the bare 'three' specifier, which browsers cannot resolve
without an import map.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-10 13:46:24 +00:00

19 lines
945 B
YAML

# Fragment showing the parts of the Forgejo service this setup needs.
# Merge into your existing compose file.
services:
forgejo:
image: codeberg.org/forgejo/forgejo:16
environment:
# Register .stl as an external markup format so Forgejo stops treating
# the file as text. RENDER_COMMAND is a deliberate no-op: with
# IS_INPUT_FILE=false the blob is piped to the command's stdin, and
# `echo` without arguments ignores stdin and emits a single newline.
# The actual rendering happens client-side in custom/public/assets/stlview.js.
- FORGEJO__markup.stl__ENABLED=true
- FORGEJO__markup.stl__FILE_EXTENSIONS=.stl
- FORGEJO__markup.stl__RENDER_COMMAND=echo
- FORGEJO__markup.stl__IS_INPUT_FILE=false
volumes:
# GITEA_CUSTOM is /data/gitea in the official image, not /data/forgejo.
- ./custom/templates:/data/gitea/templates
- ./custom/public:/data/gitea/public