mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
refactor: optimize Docker build and deployment process, and rewrite README with comprehensive details.
This commit is contained in:
1 parent
2a28eb44d8
commit
3c0d472a31
3 files changed
+318
-64
No files matched your search
+6
-5
@@ -4,8 +4,8 @@ FROM ghcr.io/cirruslabs/flutter:stable AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy pubspec files
|
||||
COPY pubspec.yaml pubspec.lock ./
|
||||
# Copy pubspec file
|
||||
COPY pubspec.yaml ./
|
||||
|
||||
# Get dependencies
|
||||
RUN flutter pub get
|
||||
@@ -19,8 +19,9 @@ RUN flutter build web --release --web-renderer canvaskit
|
||||
# Stage 2: Serve with dhttpd (Dart HTTP Server)
|
||||
FROM dart:stable AS runtime
|
||||
|
||||
# Install dhttpd globally
|
||||
# Install dhttpd globally and add to PATH
|
||||
RUN dart pub global activate dhttpd
|
||||
ENV PATH="$PATH:/root/.pub-cache/bin"
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /app
|
||||
@@ -37,5 +38,5 @@ EXPOSE 8080
|
||||
# Set environment variable for Hive storage
|
||||
ENV HIVE_STORAGE_PATH=/app/data
|
||||
|
||||
# Run dhttpd server
|
||||
CMD ["dart", "pub", "global", "run", "dhttpd", "--host", "0.0.0.0", "--port", "8080", "--path", "/app/web"]
|
||||
# Run dhttpd server (now available in PATH)
|
||||
CMD ["dhttpd", "--host", "0.0.0.0", "--port", "8080", "--path", "/app/web"]
|
||||
Reference in new issue
Block a user