install.sh: detect RAM at runner install time and create swap only when
needed (<2GB → 2G swap, 2-4GB → 1G swap, >4GB → no swap).
workflow: detect RAM at build time and set NODE_OPTIONS accordingly
(<2GB → 768MB, 2-4GB → 1536MB, >4GB → 3072MB).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- workflow: limit Node.js to 768MB (NODE_OPTIONS --max-old-space-size)
and remove GitHub Actions cache (not supported on Forgejo Actions)
- install: auto-create 2GB swapfile when installing Forgejo Runner so
the build process does not OOM on low-RAM machines
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gitea/act_runner entrypoint auto-registers on first start using
GITEA_INSTANCE_URL and GITEA_RUNNER_REGISTRATION_TOKEN env vars,
then starts the daemon. Remove the separate register step entirely.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gitea/act_runner sets act_runner as the container entrypoint, so the
register and daemon subcommands must be passed directly without the
binary name prefix.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
code.forgejo.org/forgejo/runner does not have usable version tags.
Use gitea/act_runner:latest from Docker Hub which is fully compatible
with Forgejo Actions. Update register/daemon commands accordingly
(act_runner instead of forgejo-runner, --instance instead of --url).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move self-update logic from do_update() to a self_update() helper called
at the entry point before showing the menu or running any command.
The script now checks for a newer version on every execution, re-execs
with the original arguments if an update is found, and is a no-op if
unreachable or already up to date.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
code.forgejo.org/forgejo/runner does not publish a 'latest' tag.
Switch to stable major version tag ':3'.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update workflow REGISTRY to src.d3v.ac and use FORGEJO_TOKEN for auth
- Update IMAGE_NAME in install.sh to src.d3v.ac/xtcnet/d3v-server:latest
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update header comment URL to src.d3v.ac/xtcnet/D3V-Server
- Update self-update URL in do_update to fetch install.sh from Forgejo
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Block port 2222 (Forgejo SSH) alongside 3000 after install since
git operations use HTTPS via NPM proxy only
- Add save_iptables_rules helper: uses netfilter-persistent if present,
otherwise writes /etc/iptables/rules.v4 and installs iptables-persistent
so DROP rules survive reboots
- Call save_iptables_rules after Forgejo port block and toggle-port-81
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Automatically add iptables DOCKER-USER DROP rule for port 3000 so
Forgejo is only reachable via NPM proxy, not directly from the internet
- Rewrite post-install instructions in English with all 6 NPM setup steps
including SSL config and correct ROOT_URL / SSH Port values
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codeberg container registry does not publish a 'latest' tag for Forgejo.
Switch to the stable major version tag 'codeberg.org/forgejo/forgejo:9'.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
generate_docker_compose now only adds the d3v-net network section if the
network actually exists on the host. Servers without Forgejo no longer
fail with "network declared as external, but could not be found".
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add Forgejo as option 8 in main menu with submenu (install/uninstall/update)
- do_forgejo_install: creates /opt/forgejo with SQLite, ports 3000/2222,
joins d3v-net network so NPM can proxy to it
- ensure_docker_network: creates d3v-net external network if missing
- On Forgejo install, regenerate D3V-NPMWG compose to include d3v-net
and connect running container immediately (no restart required)
- Success output includes step-by-step NPM Proxy Host setup guide
- DOCKER_NETWORK constant (d3v-net) shared across both stacks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Sửa lỗi db.js export getInstance() thay vì knex instance trực tiếp
- Tìm admin theo user đầu tiên trong DB thay vì hard-code id=1
- Chỉ hỏi mật khẩu mới, hiển thị email sau khi update thành công
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>