From fd4abfaf43c81ebf2f0a1d0b78e72bddea0d01ab Mon Sep 17 00:00:00 2001 From: thomashii Date: Tue, 26 Apr 2022 09:22:32 +0800 Subject: [PATCH] Updated Dockfile --- Dockerfile | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index c84bc87..cfc2775 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,23 @@ -FROM google/dart:latest +FROM dart:latest -COPY ./ ./ +# Copy all the source code +COPY ./config /app/config +COPY ./lib /app/lib +COPY ./bin /app/bin +COPY ./views /app/views +COPY ./web /app/web +COPY ./*.yaml /app/ -# Install dependencies, pre-build -RUN pub get +WORKDIR /app +RUN dart pub upgrade -# Optionally build generaed sources. +# Optionally build generated sources. # RUN pub run build_runner build -# Set environment, start server +# Set environment, start server in JIT mode ENV ANGEL_ENV=production EXPOSE 3000 -CMD dart bin/prod.dart +CMD dart ./bin/prod.dart -p 3000 -a 0.0.0.0 + +# Use -j flag to set higher number of isolates +#CMD dart ./bin/prod.dart -p 3000 -a 0.0.0.0 -j 50 \ No newline at end of file