Database (better-sqlite3): - Persist items, furnaces, alerts, recipes, settings to SQLite - Auto-restore last known state when server restarts or bridge disconnects - Item count history tracking (5-min snapshots, 7-day retention) - /api/history/:itemName endpoint for item count history - Docker volume for database file persistence - Graceful shutdown with DB connection cleanup Icons: - Replace mc-heads.net with official Minecraft game textures via CDN - Cascading fallback: item texture -> block texture -> emoji - In-memory URL cache to avoid redundant network requests - Block texture suffix mapping (furnace_front, barrel_top, etc.) - Crisp pixel-art rendering with image-rendering: pixelated
33 lines
676 B
YAML
33 lines
676 B
YAML
services:
|
|
server:
|
|
build: ./server
|
|
networks:
|
|
- inventory-network
|
|
volumes:
|
|
- server-data:/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/api/health',r=>{process.exit(r.statusCode===200?0:1)}).on('error',()=>process.exit(1))"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
start_period: 5s
|
|
retries: 3
|
|
|
|
client:
|
|
build: ./client
|
|
ports:
|
|
- "80:80"
|
|
networks:
|
|
- inventory-network
|
|
depends_on:
|
|
server:
|
|
condition: service_started
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
inventory-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
server-data:
|