Files
rmsitzandClaude Sonnet 5 71d6158c60 Fix build version showing "unknown" in production
The previous approach baked git rev-parse --short HEAD into the image
at Docker build time, but Dockhand's build context doesn't reliably
have .git available, so it silently fell back to "unknown" in
production even though the build itself succeeded. Replace it with a
plain VERSION file committed to the repo (a timestamp + short
description, updated by hand alongside each commit) that ships via the
same COPY . . as everything else - no git access needed inside the
build at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 14:00:42 -04:00

30 lines
912 B
Docker

# set base image (host OS)
FROM python:3.13.5-slim-bookworm
# set the working directory in the container
WORKDIR /app
# ffprobe (from ffmpeg) reads each video's duration for the library
# browser's "how long is this course" display
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# copy the dependencies file to the working directory
COPY requirements.txt .
# install dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# copy the content of the local src directory to the working directory
COPY . .
EXPOSE 5000
# add healthcheck using Python standard library
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:5000/health').read()"
# command to run on container start
CMD [ "python", "/app/offlineu_core.py" ]