asxpio/Dockerfile
Sergei Poljanski 201a70b07b
All checks were successful
Build and Deploy to Production / test (push) Successful in 22s
Build and Deploy to Production / build (push) Successful in 1m1s
Build and Deploy to Production / deploy (push) Successful in 39s
bingo: SEO pass and resized photos
The bingo host fell through to asxp.io's public/, so crawlers got
asxp.io's robots.txt pointing at asxp.io's sitemap (and the keys and
invoice JS were served too). Turn static files off for BingoWeb and give
it its own robots.txt and a sitemap with hreflang alternates.

The card loaded 15.6 MB of full-size photos as cell backgrounds. Derive
480/1200 px WebP variants with ImageMagick on store (memory/area limits,
input coder pinned to the sniffed type), render cells as <img> with lazy
loading past the first two rows, and add an admin action that rebuilds
variants from the stored originals.

Head gets per-locale titles and descriptions carrying the live score,
og:image from the latest hit, Twitter card, og:locale alternates,
JSON-LD WebSite + ItemList, and Vary: Accept-Language on the redirect.

Assisted-by: Claude:opus-5
2026-10-10 06:26:03 +04:00

33 lines
953 B
Docker

FROM ruby:3.4-slim-bookworm
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
imagemagick \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd -g 11000 asxpio \
&& useradd -d /app -u 21000 -g 11000 -m -s /bin/bash asxpio
WORKDIR /app
USER asxpio
ENV GEM_HOME=/app/bundle
ENV PATH="${GEM_HOME}/bin:${PATH}"
COPY --chown=asxpio Gemfile Gemfile.lock* ./
ENV BUNDLE_FROZEN=true
RUN bundle install --without development:test
COPY --chown=asxpio . .
ENV PUMA_PORT=3000
ENV PUMA_THREADS="4:16"
ENV RACK_ENV=production
EXPOSE 3000
# Slim image has no curl; ruby is right there.
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD ruby -rnet/http -e 'port = ENV.fetch("PUMA_PORT", "3000"); exit(Net::HTTP.get_response(URI("http://127.0.0.1:#{port}/healthz")).code == "200" ? 0 : 1)'
CMD ["sh", "-c", "exec puma -b tcp://0.0.0.0:${PUMA_PORT} -t ${PUMA_THREADS} --preload"]