rework main models

This commit is contained in:
2025-10-30 09:19:55 +03:00
parent 178854c6ba
commit 94df5171db
25 changed files with 744 additions and 190 deletions

View File

@@ -18,34 +18,26 @@ RUN apt-get update && apt-get install -y \
postgresql-client \
build-essential \
libpq-dev \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies for GDAL
RUN pip install --upgrade pip && \
pip install --no-cache-dir GDAL==$(gdal-config --version)
# Set work directory
WORKDIR /app
# Copy project requirements
# Copy project files
COPY pyproject.toml uv.lock ./
# Install uv package manager
RUN pip install --upgrade pip && pip install uv
# Install uv and dependencies
RUN pip install --no-cache-dir uv && \
uv sync --frozen --no-dev
# Install dependencies using uv
RUN uv pip install --system --no-cache-dir -r uv.lock
# Copy project
# Copy project code (после установки зависимостей для лучшего кэширования)
COPY . .
# Collect static files
RUN python manage.py collectstatic --noinput
RUN uv run manage.py collectstatic --noinput
# Expose port
EXPOSE 8000
# Run gunicorn server
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "3", "dbapp.wsgi:application"]
CMD [".venv/bin/gunicorn", "--bind", "0.0.0.0:8000", "--workers", "3", "dbapp.wsgi:application"]