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

Создание чата7

This commit is contained in:
MoonTestUse1
2025-01-05 06:03:27 +06:00
parent bdb2c9e2e5
commit 96fa597806
2 changed files with 13 additions and 28 deletions

View File

@@ -1,7 +1,5 @@
# Use Python 3.11
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies
@@ -11,13 +9,10 @@ RUN apt-get update && apt-get install -y \
postgresql-client \
&& 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 . .
# Create script to run migrations and start app
@@ -30,10 +25,8 @@ echo "Database is ready!"\n\
echo "Running migrations..."\n\
cd /app && alembic upgrade head\n\
echo "Starting application..."\n\
python run.py' > /app/start.sh && chmod +x /app/start.sh
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload' > /app/start.sh && chmod +x /app/start.sh
# Expose port
EXPOSE 8000
# Run migrations and start application
CMD ["/app/start.sh"]