# Mineflappy — Minecraft Flappy Bird
# A single static page served by nginx. No build step, no Node runtime.
FROM nginx:1.27-alpine

LABEL org.opencontainers.image.title="Mineflappy" \
      org.opencontainers.image.description="Minecraft Flappy Bird - single file static game" \
      org.opencontainers.image.licenses="MIT"

# Replace nginx's placeholder page with the game
RUN rm -f /usr/share/nginx/html/index.html
COPY index.html /usr/share/nginx/html/index.html
COPY nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80

# Coolify/Traefik use this to decide the container is live
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
  CMD wget -q --spider http://127.0.0.1/ || exit 1

CMD ["nginx", "-g", "daemon off;"]
