19 أسطر
417 B
Docker
19 أسطر
417 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# نسخ المشروع
|
|
COPY backend/ ./backend/
|
|
COPY dist/ ./dist/
|
|
|
|
# تثبيت الأدوات
|
|
RUN apt update && apt install -y postgresql-client && \
|
|
pip install --no-cache-dir -r backend/requirements.txt gunicorn
|
|
|
|
# متغيرات بيئية للـ URIs
|
|
ENV FLASK_APP=backend/app.py
|
|
ENV PORT=8000
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "backend.app:app"] |