mirror of
https://github.com/kjanat/livegraphs-django.git
synced 2026-01-16 06:22:09 +01:00
- Introduced .pre-commit-config.yaml for pre-commit hooks using uv-pre-commit. - Created lint.sh script to run Ruff and Black for linting and formatting. - Added test.sh script to execute tests with coverage reporting. - Configured .uv file for uv settings including lockfile management and dependency resolution. - Updated Makefile with targets for virtual environment setup, dependency installation, linting, testing, formatting, and database migrations. - Established requirements.txt with main and development dependencies for the project.
35 lines
674 B
Docker
35 lines
674 B
Docker
# Dockerfile
|
|
|
|
FROM python:3.13-slim
|
|
|
|
# Set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
ENV DJANGO_SETTINGS_MODULE=dashboard_project.settings
|
|
|
|
# Set work directory
|
|
WORKDIR /app
|
|
|
|
# Install UV for Python package management
|
|
RUN pip install uv
|
|
|
|
# Copy project files
|
|
COPY pyproject.toml .
|
|
COPY uv.lock .
|
|
COPY . .
|
|
|
|
# Install dependencies
|
|
RUN uv pip install -e .
|
|
|
|
# Change to the Django project directory
|
|
WORKDIR /app/dashboard_project
|
|
|
|
# Collect static files
|
|
RUN python manage.py collectstatic --noinput
|
|
|
|
# Change back to the app directory
|
|
WORKDIR /app
|
|
|
|
# Run gunicorn
|
|
CMD ["gunicorn", "dashboard_project.wsgi:application", "--bind", "0.0.0.0:8000"]
|