5.1 KiB
Executable File
Changelog - init.sh
Version 1.1.0 - 2026-04-12
New Architecture Restructuring
Major update to the directory structure and webapp discovery system.
Directory Structure Changes
-
New Path Convention
- Code:
/opt/apxtowns/{TOWN}.{NATION}/apxtri/ - Data:
/var/lib/apxtowns/{TOWN}.{NATION}/{tribe}/ - Example:
/opt/apxtowns/dev.test/apxtri/+/var/lib/apxtowns/dev.test/dev/
- Code:
-
Per-Tribe Data Namespaces
- Each tribe now has its own
objects/andwwws/directories - Webapps stored in tribe namespace, not in apxtri core
- Each tribe now has its own
-
Web Application Discovery
- Webapps auto-discovered from
{tribe}/wwws/directories - Routes: path-based
/{app}/*or custom DNS inappconf.json - Caddy auto-generates routes from discovered webapps
- Webapps auto-discovered from
New Features
-
Auto-Generated API Documentation
- apidoc auto-generated on server startup
- Output to webapp runtime directory
- Skip if already generated (dev mode)
-
Auto-Update via Git
setup/update.shscans all package.json files- Compares local vs remote versions
- Pulls updates from
repository.url
-
Per-Tribe Backup Configuration
backupObjects[]in tribe.json specifies what to backupsetup/backup.shreads from tribe config- Daily backup at 1:00 AM
Removed Features
-
WCO (Web Component Objects)
- Removed from codebase
models/Wwws.jssimplifiedroutes/wwws.jsupdated (WCO routes removed)
-
Old Path References
- Removed
farm-testdirectory structure - Removed
apxtri/objects/andapxtri/wwws/ - All data now per-tribe
- Removed
Migration Notes
For existing installations:
- Backup all data
- Run
setup/init.sh --clean - Reinstall with new path structure
- Restore data to appropriate tribe namespaces
Version 1.0.0 - 2024-10-29
Initial unified installation script
Features
-
Unified dev/prod installation
- Both modes use systemd for process management
- Auto-detection based on
NATION="test"(dev) vs other (prod)
-
Automatic crontab configuration
- Update: Daily at 03:00 AM, compares versions, auto-updates
- Backup: Daily at 01:00 AM, rolling 7-day backup
-
Intelligent domain management
- Dev: Auto-generates
admin.apxtri.{TOWN}.test - Prod: Required domain with DNS verification
- Dev: Auto-generates
-
Auto port detection
- Finds first free port starting from 3000
- Avoids conflicts on multiple installations
-
Dual log output
- All logs to journalctl AND files
- Dev:
/var/lib/apxtowns/data/apxtri/logs/dev.log - Prod:
/var/lib/apxtowns/data/apxtri/logs/prod.log
-
Systemd service management
sudo systemctl start apxtri@town.nation # Start service sudo systemctl stop apxtri@town.nation # Stop service sudo systemctl restart apxtri@town.nation # Restart sudo systemctl status apxtri@town.nation # Check status journalctl -f -u apxtri@town.nation # Follow logs
Version 1.2.0 - 2026-05-14
HTTP-Only Installation (Major Change)
Installation now only configures HTTP on port 80. TLS/HTTPS is deferred to the web interface.
Removed Features
-
Caddy TLS automation removed from init.sh and Caddy.js
- No more port 443 in Caddy config
- No more Let's Encrypt ACME certificate provisioning on startup
- No more TLS automation block in generated Caddy config
-
SSL/HTTPS deferred to web UI
- HTTPS activation will be handled via a Node.js endpoint in a future release
- The web interface will trigger certificate provisioning when the user is ready
New Flags
-
--domain <domain>- Sets the public domain name for the town
- Used for routing in Caddy config and display in the startup message
- In dev mode, auto-generated as
admin.{TOWN}.{NATION} - In prod mode, must be provided manually
-
--trusted-proxy-ips <ip>- Configures PROXY protocol v2 support for reverse proxy setups
- Accepts comma-separated IPs (e.g.,
192.168.1.3,10.31.251.1) - IPs are converted to CIDR format (
/32) for Caddy 2.11+listener_wrappers[].allow
Bug Fixes
-
apidoc template rendering — Fixed
conf.json→appconf.jsonfilename in Mustache rendering block (lines 345-355). The condition was checking for the old filename, so{{NODEPATH}}was never replaced. -
Startup message URL — Fixed from
https://tohttp://and corrected the fallback domain format. -
Data skeleton copy — Added missing copy of
setup/skeletons/newtribe/data/to tribe data directory during installation.
Caddy.js Changes
- Listen is now always
[":80"](removed MODE-dependent port selection) - TLS automation block removed entirely
listener_wrapperswithproxy_protocolkept for PROXY protocol support- PROXY protocol format updated to Caddy 2.11+ (
allowwith CIDR inlistener_wrappers)
Usage
# Installation interactive
./init.sh
# Installation automatisée
./init.sh --town farm --nation test
# Réinstallation propre
./init.sh --clean
Support
Discord: https://discord.gg/89Ucsnej Repository: https://gitea.ndda.fr/apxtri/apxtri