From ca599525a8049b7a025e2305fd0c3ab1a76025c9 Mon Sep 17 00:00:00 2001 From: mustafa_98 Date: Fri, 16 Jan 2026 23:10:08 +0000 Subject: [PATCH] =?UTF-8?q?=D8=B1=D9=81=D8=B9=20=D8=A7=D9=84=D9=85=D9=84?= =?UTF-8?q?=D9=81=D8=A7=D8=AA=20=D8=A5=D9=84=D9=89=20"/"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c09188f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +# Build stage for React frontend +FROM node:18-alpine AS frontend-build +WORKDIR /app/frontend +COPY frontend/package*.json ./ +RUN npm install +COPY frontend/ ./ +RUN npm run build + +# Production stage for Python backend +FROM python:3.11-slim +WORKDIR /app + +# Install system dependencies for database clients +RUN apt-get update && apt-get install -y \ + default-mysql-client \ + postgresql-client \ + && rm -rf /var/lib/apt/lists/* + +# Copy built frontend +COPY --from=frontend-build /app/dist ./dist + +# Copy backend +COPY backend/ ./backend/ + +# Install Python dependencies +RUN pip install --no-cache-dir -r backend/requirements.txt gunicorn + +# Environment variables +ENV FLASK_APP=backend/app.py +ENV PORT=8000 + +# Expose port +EXPOSE 8000 + +# Run with gunicorn +CMD ["gunicorn", "--bind", "0.0.0.0:8000", "backend.app:app"] \ No newline at end of file