chore: add environment variable support and enhance startup script

- Add .env.example template for configurable Docker deployment settings
- Update docker-compose.yml to support environment-driven port/timezone configuration
- Refactor start.sh with improved Docker Compose detection, environment validation, and automated frontend building
- Enhance script documentation and error handling for better maintainability
This commit is contained in:
d0lwl0b
2025-10-29 22:35:01 +08:00
parent 0c6f1bc408
commit b2c09ca15b
4 changed files with 137 additions and 33 deletions

13
.env.example Normal file
View File

@@ -0,0 +1,13 @@
# NOFX Environment Variables Template
# Copy this file to .env and modify the values as needed
# Ports Configuration
# Backend API server port (internal: 8080, external: configurable)
NOFX_BACKEND_PORT=8080
# Frontend web interface port (Nginx listens on port 80 internally)
NOFX_FRONTEND_PORT=3000
# Timezone Setting
# System timezone for container time synchronization
NOFX_TIMEZONE=Asia/Shanghai