1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

чиним билд14

This commit is contained in:
MoonTestUse1
2025-01-02 00:34:58 +06:00
parent 6c759c0899
commit 6c10497678
4 changed files with 87 additions and 0 deletions

26
backend/Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
# Use Python 3.11
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port
EXPOSE 8000
# Run migrations and start application
CMD ["sh", "-c", "alembic upgrade head && python run.py"]