Added compose file for quick local setup
Simplified the Dockerfile Added compose docs to the README
This commit is contained in:
+3
-18
@@ -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;"]
|
||||
|
||||
Reference in New Issue
Block a user