mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Создание чата7
This commit is contained in:
@@ -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"]
|
Reference in New Issue
Block a user