Start scripts (PS1 + Shell), Dockerfile, E2E sync tests, and README documentation for Phase 2 LAN server deployment. New files: - start-server.ps1 / start-server.sh: one-command server startup with auto-build, LAN-IP detection, and configurable API key - Dockerfile: multi-stage build (Gradle → JRE Alpine) for container deployment with volume mount for persistent data - .dockerignore: excludes app/, .git, build artifacts from Docker context - EndToEndSyncTest.kt: 7 E2E tests covering full push/pull sync cycle, multi-client overwrite, empty DB pull, multiple round-trips, and auth rejection for unauthenticated requests - README.md: project overview, build instructions, and complete Phase 2 server setup docs (4 start options, LAN setup, API reference, security) Changed files: - AndroidManifest.xml: added usesCleartextTraffic=true for HTTP in LAN Closes #46
19 lines
524 B
Docker
19 lines
524 B
Docker
# Stage 1: Build the fat JAR
|
|
FROM gradle:8.11.1-jdk21 AS builder
|
|
WORKDIR /app
|
|
COPY gradle/ gradle/
|
|
COPY gradlew gradlew.bat build.gradle.kts settings.gradle.kts gradle.properties ./
|
|
COPY shared/ shared/
|
|
COPY server/ server/
|
|
RUN gradle :server:buildFatJar --no-daemon
|
|
|
|
# Stage 2: Run
|
|
FROM eclipse-temurin:21-jre-alpine
|
|
WORKDIR /app
|
|
COPY --from=builder /app/server/build/libs/server.jar server.jar
|
|
|
|
ENV KRISENVORRAT_API_KEY="change-me-to-a-secure-key-at-least-32-chars"
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["java", "-jar", "server.jar"]
|