areweplaying/Dockerfile
Harry Culpan 7370d1291e Add noon-of-gameday GM status email via awp-cli gameday-notice
Adds a cron-driven CLI command that emails the GM a player attendance
summary at noon on the session date, skipping automatically if the
game was canceled or today isn't game day, and tracking last-sent
date so it won't double-send.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-11 19:18:02 -04:00

41 lines
1.3 KiB
Docker

# Use a minimal base image
FROM alpine:latest
# Set environment variables (if needed)
ENV APP_NAME="areweplaying"
ENV APP_DIR="/app"
# Cron times (e.g. the noon gameday-notice job) are evaluated in this
# timezone. Without tzdata + TZ, Alpine's cron defaults to UTC.
ENV TZ="America/New_York"
# Create the working directory
WORKDIR $APP_DIR
# Copy the application binaries
COPY areweplaying /app/areweplaying
COPY awp-cli /app/awp-cli
# Ensure the binaries are executable
RUN chmod +x /app/areweplaying
RUN chmod +x /app/awp-cli
RUN apk add --no-cache cronie tzdata
# Install the crontab: runs `./awp-cli check` every 2 minutes and
# `./awp-cli gameday-notice` daily at noon, logging output to
# /app/logs/cron.log (logs/ is mounted at runtime).
COPY crontab.txt /app/crontab.txt
RUN crontab /app/crontab.txt
# NOTE: static/, players.json, .env, and logs/ are no longer copied
# into the image. They're mounted at runtime via docker-compose.yml
# so they live on the host and persist/update independently of the image.
# Expose the port your app runs on (update if necessary)
#EXPOSE 8080
EXPOSE 3000
# crond forks into the background on its own (daemon mode), then
# areweplaying takes over as PID 1 via exec so it gets signals properly.
CMD crond && exec /app/areweplaying