Add Dockerfile and docker-compose working
Browse files- Dockerfile +6 -2
- README.md +8 -1
- docker-compose.yml +11 -0
- requirements.txt +5 -1
- testing.ipynb +0 -0
Dockerfile
CHANGED
@@ -6,13 +6,17 @@ WORKDIR /app
|
|
6 |
|
7 |
# Copiar los archivos de requisitos y el archivo Dockerfile en el contenedor
|
8 |
COPY requirements.txt ./
|
9 |
-
COPY
|
|
|
10 |
|
11 |
# Instalar las dependencias
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
|
|
|
|
|
|
14 |
# Exponer el puerto 8000 para que otros contenedores puedan acceder a tu API
|
15 |
EXPOSE 8000
|
16 |
|
17 |
# Comando para iniciar la aplicación
|
18 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
6 |
|
7 |
# Copiar los archivos de requisitos y el archivo Dockerfile en el contenedor
|
8 |
COPY requirements.txt ./
|
9 |
+
COPY api/ ./api/
|
10 |
+
COPY src/ ./src/
|
11 |
|
12 |
# Instalar las dependencias
|
13 |
RUN pip install --no-cache-dir -r requirements.txt
|
14 |
|
15 |
+
# Establecer PYTHONPATH al directorio raíz
|
16 |
+
ENV PYTHONPATH "${PYTHONPATH}:/app"
|
17 |
+
|
18 |
# Exponer el puerto 8000 para que otros contenedores puedan acceder a tu API
|
19 |
EXPOSE 8000
|
20 |
|
21 |
# Comando para iniciar la aplicación
|
22 |
+
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
README.md
CHANGED
@@ -1,2 +1,9 @@
|
|
1 |
-
#
|
2 |
Web scrapping proyect for predict vehicle prices
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# MeLi Scraper
|
2 |
Web scrapping proyect for predict vehicle prices
|
3 |
+
|
4 |
+
## API
|
5 |
+
To run the API for this project please run
|
6 |
+
```bash
|
7 |
+
docker compose up
|
8 |
+
```
|
9 |
+
|
docker-compose.yml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
version: '3'
|
2 |
+
|
3 |
+
services:
|
4 |
+
meli:
|
5 |
+
build: .
|
6 |
+
ports:
|
7 |
+
- 8000:8000
|
8 |
+
volumes:
|
9 |
+
- ./requirements.txt:/app/requirements.txt
|
10 |
+
- ./api:/app/api
|
11 |
+
- ./src:/app/src
|
requirements.txt
CHANGED
@@ -1,2 +1,6 @@
|
|
1 |
fastapi==0.109.0
|
2 |
-
uvicorn==0.25.0
|
|
|
|
|
|
|
|
|
|
1 |
fastapi==0.109.0
|
2 |
+
uvicorn==0.25.0
|
3 |
+
requests==2.31.0
|
4 |
+
pandas==2.1.4
|
5 |
+
bs4==0.0.1
|
6 |
+
aiohttp==3.9.1
|
testing.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|