From 7ae9a9736f2b67a1f96ad5e53e557de799b18043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D1=83=D0=B7=D0=BD=D0=B5=D1=86=D0=BE=D0=B2=20=D0=9D?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9?= Date: Mon, 11 Nov 2024 23:42:27 +0300 Subject: [PATCH] updated front docker --- .../get_equipment_warnings_statistics.dart | 1 - .../get_equipment_working_percentage.dart | 1 - .../get_statistic_working_percentage.dart | 1 - frontend.Dockerfile | 27 +++++++++++++++++++ 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 frontend.Dockerfile diff --git a/flutter_front/lib/features/statistics/domain/usecases/get_equipment_warnings_statistics.dart b/flutter_front/lib/features/statistics/domain/usecases/get_equipment_warnings_statistics.dart index aa036b4..421505c 100644 --- a/flutter_front/lib/features/statistics/domain/usecases/get_equipment_warnings_statistics.dart +++ b/flutter_front/lib/features/statistics/domain/usecases/get_equipment_warnings_statistics.dart @@ -1,4 +1,3 @@ -import 'dart:ffi'; import 'package:clean_architecture/features/statistics/data/models/warning_statistics.dart'; import 'package:clean_architecture/features/statistics/domain/entities/warning_statistics_entity.dart'; diff --git a/flutter_front/lib/features/statistics/domain/usecases/get_equipment_working_percentage.dart b/flutter_front/lib/features/statistics/domain/usecases/get_equipment_working_percentage.dart index ec874c1..e63d40d 100644 --- a/flutter_front/lib/features/statistics/domain/usecases/get_equipment_working_percentage.dart +++ b/flutter_front/lib/features/statistics/domain/usecases/get_equipment_working_percentage.dart @@ -1,4 +1,3 @@ -import 'dart:ffi'; import 'package:clean_architecture/shared/domain/entities/percentage_entity.dart'; import 'package:clean_architecture/shared/domain/repositories/influxdb_repository.dart'; diff --git a/flutter_front/lib/features/statistics/domain/usecases/get_statistic_working_percentage.dart b/flutter_front/lib/features/statistics/domain/usecases/get_statistic_working_percentage.dart index 7399856..ec4ce20 100644 --- a/flutter_front/lib/features/statistics/domain/usecases/get_statistic_working_percentage.dart +++ b/flutter_front/lib/features/statistics/domain/usecases/get_statistic_working_percentage.dart @@ -1,4 +1,3 @@ -import 'dart:ffi'; import 'package:clean_architecture/shared/domain/repositories/influxdb_repository.dart'; import 'package:dartz/dartz.dart'; diff --git a/frontend.Dockerfile b/frontend.Dockerfile new file mode 100644 index 0000000..0758916 --- /dev/null +++ b/frontend.Dockerfile @@ -0,0 +1,27 @@ +FROM debian:latest AS build-env + +RUN apt-get update && \ + apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3 sed && \ + apt-get clean + +RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter + +ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}" + +RUN flutter doctor + +RUN flutter channel stable +RUN flutter upgrade +RUN flutter config --enable-web + +WORKDIR /app +COPY ./flutter_front . +RUN flutter build web + +FROM nginx:stable-alpine +COPY --from=build-env /app/build/web /usr/share/nginx/html + +COPY nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file