v0.8.10
Zero-config Docker setup
Docker Compose now works with zero configuration — just docker-compose.yml and docker compose up -d. No .env file, no schema.sql download needed.
What changed
-
Auto-apply schema on startup — tr-engine now embeds
schema.sqland applies it automatically when it connects to a fresh database. No more downloadingschema.sqlseparately or mounting it into the PostgreSQL container's init directory. -
Configurable Docker defaults via
.env— database credentials (POSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_DB) and host ports (HTTP_PORT,MQTT_PORT) are now configurable in.envwith sensible defaults.DATABASE_URLis built automatically from thePOSTGRES_*variables — no more duplicating credentials in multiple places. -
Simplified docs — Docker quickstart is now one
curl+ one command.sample.envis optional (download it only when you need to customize). Updateddocker.md,docker-external-mqtt.md,getting-started.md, andinstall.sh.
Upgrading
No action needed — existing databases are detected and the schema auto-apply is skipped. The schema.sql volume mount in your docker-compose.yml is harmless if still present, but you can remove it:
# Remove this line from your postgres volumes:
- ./schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:roFiles changed
| File | Change |
|---|---|
embed.go |
Embed schema.sql in binary |
internal/database/schema.go |
New — InitSchema() checks for tables, applies if missing |
cmd/tr-engine/main.go |
Call InitSchema() between Connect and Migrate |
docker-compose.yml |
Remove schema mount, add ${POSTGRES_*} / ${HTTP_PORT} / ${MQTT_PORT} interpolation |
sample.env |
Add Docker-specific variables section |
install.sh |
Remove schema.sql download, use variable interpolation |
docs/docker.md |
Zero-config quickstart, document new variables |
docs/docker-external-mqtt.md |
Same cleanup |
docs/getting-started.md |
Note auto-apply, keep manual option |