creating first structure of cinema backend server

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2025-11-16 00:01:14 +01:00
parent 92da4423b2
commit a5d9372806
15 changed files with 362 additions and 58 deletions

View File

@@ -8,13 +8,17 @@ RUN dart pub get
# Copy app source code (except anything in .dockerignore) and AOT compile app.
COPY . .
RUN dart compile exe bin/server.dart -o bin/server
RUN dart run build_runner build --delete-conflicting-outputs
RUN APP_VERSION=$(awk '/^version:/{print $2}' pubspec.yaml) && \
dart compile exe bin/server.dart -o bin/server \
-DAPP_VERSION=$APP_VERSION
# Build minimal serving image from AOT-compiled `/server`
# and the pre-built AOT-runtime in the `/runtime/` directory of the base image.
FROM scratch
COPY --from=build /runtime/ /
COPY --from=build /app/bin/server /app/bin/
COPY assets /
# Start server.
EXPOSE 8080