Added compose file for quick local setup

Simplified the Dockerfile
Added compose docs to the README
This commit is contained in:
Nguyen Thai
2022-11-18 12:34:34 +07:00
committed by Dat H. Pham
parent fb14e79441
commit 7fb0781980
4 changed files with 60 additions and 21 deletions
+3 -18
View File
@@ -23,23 +23,7 @@ WORKDIR /app
COPY . .
# Precompile tmail flutter
RUN cd core \
&& flutter pub get \
&& cd ../model \
&& flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs \
&& cd ../contact \
&& flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs \
&& cd ../rule_filter \
&& flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs \
&& cd ../forward \
&& flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs \
&& cd ../fcm \
&& flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs \
&& cd .. \
&& flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs \
&& flutter pub get && flutter pub run intl_generator:extract_to_arb --output-dir=./lib/l10n lib/main/localizations/app_localizations.dart \
&& flutter pub get && flutter pub run intl_generator:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/main/localizations/app_localizations.dart lib/l10n/intl*.arb \
&& flutter build web --profile
RUN bash prebuild.sh && flutter build web --profile
# Stage 2 - Create the run-time image
FROM nginx:mainline
@@ -51,4 +35,5 @@ COPY --from=build-env /app/build/web /usr/share/nginx/html
EXPOSE 80
# Before stating NGinx, re-zip all the content to ensure customizations are propagated
CMD gzip -k -r /usr/share/nginx/html/ && nginx -g 'daemon off;'
RUN gzip -k -f -r /usr/share/nginx/html/
CMD ["nginx", "-g", "daemon off;"]