feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo: its basics say it serves `todo`, sign-in mails name Halkyon Todo, the source is this repository, minimumAppBuild 1. Authentication through the module (anonymous, GitHub, email codes, server-side sessions) in place of the scaffold's email-and-password provider; the module's pruning scheduled once however often the server starts. The scaffold's greeting, its Flutter web hosting, cloud storage and Docker files go; session logs are never persisted. Todo was never deployed, so its migrations start again with one initial migration. The root's lints apply, with the four constructor rules off as on Learn's server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
38770569ea
commit
28dd3ea65a
1 changed files with 1047 additions and 1741 deletions
|
|
@ -1,58 +0,0 @@
|
|||
# Build from the project root with:
|
||||
# docker build -f halkyon_todo_server/Dockerfile .
|
||||
|
||||
# Build stage
|
||||
FROM dart:3.12.2 AS build
|
||||
|
||||
# Create a minimal workspace that preserves locked server dependency versions.
|
||||
WORKDIR /app
|
||||
COPY pubspec.lock .
|
||||
COPY halkyon_todo_server halkyon_todo_server
|
||||
RUN printf '%s\n' \
|
||||
'name: _' \
|
||||
'environment:' \
|
||||
' sdk: ^3.12.2' \
|
||||
'workspace:' \
|
||||
' - halkyon_todo_server' \
|
||||
> pubspec.yaml
|
||||
RUN dart pub get
|
||||
|
||||
# Compile the server executable.
|
||||
WORKDIR /app/halkyon_todo_server
|
||||
RUN dart build cli --target bin/main.dart --output build
|
||||
RUN mv build/bundle/bin/main build/bundle/bin/server
|
||||
|
||||
# Add a fallback for the copy of possibly missing directories.
|
||||
RUN mkdir -p config web migrations
|
||||
|
||||
# Final stage
|
||||
FROM alpine:latest
|
||||
WORKDIR /app
|
||||
|
||||
# Environment variables
|
||||
ENV runmode=production
|
||||
ENV serverid=default
|
||||
ENV logging=normal
|
||||
ENV role=monolith
|
||||
|
||||
# Copy runtime dependencies
|
||||
COPY --from=build /runtime/ /
|
||||
|
||||
# Copy compiled server executable and native libraries
|
||||
COPY --from=build /app/halkyon_todo_server/build/bundle/ ./
|
||||
|
||||
# Copy configuration files and resources
|
||||
COPY --from=build /app/halkyon_todo_server/config/ config/
|
||||
COPY --from=build /app/halkyon_todo_server/web/ web/
|
||||
COPY --from=build /app/halkyon_todo_server/migrations/ migrations/
|
||||
|
||||
# This file is required to enable the endpoint log filter in Insights.
|
||||
COPY --from=build /app/halkyon_todo_server/lib/src/generated/protocol.yaml lib/src/generated/protocol.yaml
|
||||
|
||||
# Expose ports
|
||||
EXPOSE 8080
|
||||
EXPOSE 8081
|
||||
EXPOSE 8082
|
||||
|
||||
# Define the entrypoint command
|
||||
ENTRYPOINT ./bin/server --mode=$runmode --server-id=$serverid --logging=$logging --role=$role
|
||||
Loading…
Reference in a new issue