python v2 - added feartures 1 and 3 - no errors2

This commit is contained in:
2025-08-08 14:48:54 -07:00
parent 2da72eec9d
commit b481694ad2
19 changed files with 2387 additions and 0 deletions

36
Dockerfile Normal file
View File

@@ -0,0 +1,36 @@
# Use official Python base image
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set work directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY garminsync/ ./garminsync/
# Create data directory
RUN mkdir -p /app/data
# Set environment variables from .env file
ENV ENV_FILE=/app/.env
ENV DATA_DIR=/app/data
# Expose web UI port
EXPOSE 8080
# Update entrypoint to support daemon mode
ENTRYPOINT ["python", "-m", "garminsync.cli"]
CMD ["--help"]