good luck
Some checks failed
CI / Lint (push) Successful in 58s
CI / Test (push) Successful in 8s
CI / Build & Push (push) Failing after 1m33s

This commit is contained in:
2026-03-29 09:20:21 -04:00
parent b10736d43c
commit 3994943757
23 changed files with 579 additions and 161 deletions

View File

@@ -1,24 +1,25 @@
# Use an official Python runtime as a parent image
FROM python:3.9-slim
FROM python:3.13-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
DATA_DIR=/app/app/data
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed dependencies specified in requirements.txt
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Create the directory for scoreboard data
RUN mkdir -p app/data
COPY . .
RUN mkdir -p $DATA_DIR \
&& adduser --disabled-password --gecos "" appuser \
&& chown -R appuser:appuser /app
USER appuser
# Expose the Flask port
EXPOSE 2897
# Run the Flask application
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:2897/')" || exit 1
CMD ["python", "run.py"]