1
0
forked from iarv/mc-webui
Files
mc-webui/Dockerfile
MarekWo 7ca3f4d2dd feat: Add dynamic Git-based versioning system
- Add app/version.py module generating version from Git metadata
- Format: YYYY.MM.DD+<commit_hash> (e.g., 2025.01.18+576c8ca9)
- Add +dirty suffix for uncommitted changes (ignores .env, technotes/)
- Add /api/version endpoint for monitoring
- Display version in hamburger menu
- Add freeze mechanism for Docker builds

Deploy command updated:
git push && ssh ... "cd ~/mc-webui && git pull && python -m app.version freeze && docker compose up -d --build"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 11:47:22 +01:00

33 lines
831 B
Docker

# mc-webui Dockerfile
# Python 3.11+ with Flask (meshcore-cli runs in separate bridge container)
FROM python:3.11-slim
# Install curl for testing
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first for better layer caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
# Note: Run 'python -m app.version freeze' before build to include version info
# The version_frozen.py file will be copied automatically if it exists
COPY app/ ./app/
# Expose Flask port
EXPOSE 5000
# Environment variables (can be overridden by docker-compose)
ENV FLASK_HOST=0.0.0.0
ENV FLASK_PORT=5000
ENV FLASK_DEBUG=false
# Run the application
CMD ["python", "-m", "app.main"]