Feat: Add prod+dev environment configuration and improve shutdown handling
## Changes
- Added environment-specific configuration loading (.env for prod, dev.env for dev)
- Implemented graceful shutdown handling for the backend server
- Added logging configuration with different log levels
- Configured Redis and PostgreSQL connection initialization
- Renamed docker compose <https://docs.docker.com/compose/intro/compose-application-model/#the-compose-file>
## Implementation Details
- Added environment detection using `RUST_ENV` variable in [`main.rs`](backend/src/main.rs)
- Implemented graceful shutdown signal handling in [`utils.rs`](backend/src/utils.rs)
- Set up tracing subscriber for structured logging with configurable levels
- Added connection pool initialization for both Redis and PostgreSQL with proper error handling
## Related Configuration
- Updated [Dockerfile](Dockerfile) to support production builds
- Added Docker Compose service definitions in [compose.yaml](compose.yaml)
- Added development instructions in [README.md](README.md) for running without Docker
## Testing Notes
- Verified graceful shutdown with Ctrl+C signal
- Tested database connections in both production and development environments
- Confirmed logging works at different levels (DEBUG, INFO, WARN, ERROR)
合并状态:未合并 关闭于 2025-02-20 1 条评论