26 lines
545 B
Docker
26 lines
545 B
Docker
FROM python:3.11-slim
|
|
|
|
# Instalar nginx
|
|
RUN apt-get update && apt-get install -y --no-install-recommends nginx \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Backend
|
|
WORKDIR /app
|
|
COPY backend/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY backend/ .
|
|
|
|
# Frontend (servido por nginx)
|
|
COPY frontend/ /usr/share/nginx/html/
|
|
|
|
# nginx config
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
RUN rm -f /etc/nginx/sites-enabled/default
|
|
|
|
# Script de arranque
|
|
COPY start.sh /start.sh
|
|
RUN chmod +x /start.sh
|
|
|
|
EXPOSE 80
|
|
CMD ["/start.sh"]
|