# Use a minimal base image
FROM alpine:latest

# Set environment variables (if needed)
ENV APP_NAME="areweplaying"
ENV APP_DIR="/app"

# 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

# 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

# Set the default command
CMD crond & /app/areweplaying
