feat(docker): add Docker support and enhance dashboard data

- Add Dockerfile and docker-compose.yml for containerized deployment
- Update server to listen on all network interfaces for Docker compatibility
- Add .dockerignore to exclude unnecessary files from build context
- Enhance dashboard controller with additional user data, trends, and suggestions
- Update package.json scripts for proper Docker build workflow
This commit is contained in:
Jp
2026-02-01 21:26:26 +08:00
parent f521970a65
commit 3dc74b6aa2
12 changed files with 81 additions and 23 deletions

View File

@@ -9,6 +9,7 @@ export declare class DashboardController {
constructor(utilsService: UtilsService, userGoalModel: typeof UserGoal, weightLogModel: typeof WeightLog);
getDashboard(req: any, res: Response): Promise<{
user: any;
current_user: any;
nutrition: {
calories: number;
protein: number;
@@ -34,19 +35,16 @@ export declare class DashboardController {
fat: number;
water: number;
};
macroPercentages: {
macro_percentages: {
protein: number;
carbs: number;
fat: number;
};
} | {
user?: undefined;
nutrition?: undefined;
water?: undefined;
goals?: undefined;
weightLogToday?: undefined;
weightChange?: undefined;
remaining?: undefined;
macroPercentages?: undefined;
suggestions: any[];
calorie_trend: any[];
weight_trend: {
date: Date;
weight_kg: number;
}[];
}>;
}