Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
FROM python:3.9-slim-buster
FROM python:3.12-slim-bookworm
WORKDIR /app

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN apt-get update && apt-get install -y --no-install-recommends build-essential
RUN pip install --no-cache-dir --upgrade pip setuptools

RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends build-essential # Update OS packages and keep build-essential

COPY backend.py ./
COPY src ./src
COPY networks ./networks
COPY bitrates ./bitrates

# CMD ["g++ -O3 -o simulation.out ./src/main.cpp"] # Commented out as per original Dockerfile

# RUN g++ -O3 -o simulation.out ./src/main.cpp

# - 'backend:app' especifica el módulo 'backend.py' y la instancia de Flask 'app'.
# - '--bind 0.0.0.0:8080' hace que Gunicorn escuche en todas las interfaces (0.0.0.0) en el puerto 8080 dentro del contenedor.
# - '--workers 3' configura Gunicorn para usar 3 procesos de trabajo para manejar las peticiones.
CMD ["gunicorn", "backend:app", "--bind", "0.0.0.0:8080", "--workers", "3"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Flask-based backend API for integrating the FlexNetSim C++ library, powering the

1. **Clone the repository:**
```bash
git clone [https://github.com/MirkoZETA/FlexNetSim-API.git](https://github.com/MirkoZETA/FlexNetSim-API.git)
git clone https://github.com/MirkoZETA/FlexNetSim-API.git
cd flask-simulation-backend
```

Expand Down