Gather data

This commit is contained in:
mike
2026-01-08 00:38:09 +01:00
parent d140b2dbac
commit 3e6d4eec02
4 changed files with 90 additions and 12 deletions

View File

@@ -1,4 +1,20 @@
FROM eclipse-temurin:21-jdk-alpine
FROM eclipse-temurin:25-jdk-alpine AS build
RUN apk add --no-cache maven
WORKDIR /app
# Copy pom.xml and download dependencies (for caching)
COPY pom.xml .
RUN mvn dependency:go-offline
# Copy source and templates
COPY src ./src
# Build and run tests with overridden properties
ARG PUZZLE_ROWS=8
ARG PUZZLE_COLS=9
RUN mvn clean test package -DPUZZLE_ROWS=${PUZZLE_ROWS} -DPUZZLE_COLS=${PUZZLE_COLS}
FROM eclipse-temurin:25-jdk-alpine
RUN apk add --no-cache curl tzdata
@@ -9,19 +25,12 @@ RUN curl -fsSL -o /usr/local/bin/supercronic \
WORKDIR /app
# Copy source files
COPY src/ /app/src/
COPY export_real_words_with_hints.csv /app/export_real_words_with_hints.csv
COPY compile.sh /app/compile.sh
# Copy the built jar and other necessary files from the build stage
COPY --from=build /app/target/tools-all.jar /app/target/tools-all.jar
COPY nl_score_hints.csv /app/nl_score_hints.csv
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
COPY crontab /app/crontab
# Compile Java code
RUN chmod +x /app/compile.sh && \
mkdir -p /app/target && \
cp src/puzzle/postgresql-42.7.8.jar /app/target/ && \
javac -cp /app/target/postgresql-42.7.8.jar -d /app/target src/puzzle/*.java
# Create output directory
RUN mkdir -p /data/puzzles