initial commit
This commit is contained in:
37
Dockerfile
Normal file
37
Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
||||
FROM eclipse-temurin:21-jdk-alpine
|
||||
|
||||
RUN apk add --no-cache curl tzdata
|
||||
|
||||
# Install supercronic for cron scheduling
|
||||
RUN curl -fsSL -o /usr/local/bin/supercronic \
|
||||
https://github.com/aptible/supercronic/releases/download/v0.2.30/supercronic-linux-amd64 \
|
||||
&& chmod +x /usr/local/bin/supercronic
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy source files
|
||||
COPY src/ /app/src/
|
||||
COPY word-list.txt /app/word-list.txt
|
||||
COPY compile.sh /app/compile.sh
|
||||
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 && \
|
||||
javac -d /app/target src/puzzle/*.java
|
||||
|
||||
# Create output directory
|
||||
RUN mkdir -p /data/puzzles
|
||||
|
||||
ENV TZ=Europe/Amsterdam
|
||||
ENV OUT_DIR=/data/puzzles
|
||||
ENV PUZZLES_PER_DAY=3
|
||||
ENV THEME_FILTER=true
|
||||
ENV THEME_MIN_SCORE=0.6
|
||||
|
||||
VOLUME ["/data"]
|
||||
|
||||
RUN chmod +x /app/docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||
Reference in New Issue
Block a user