Spaces:
Sleeping
Sleeping
Commit
·
a90a6d5
1
Parent(s):
c933909
backend deploymemt
Browse files- Dockerfile +2 -2
- main.py +3 -3
- routes/continents.py +3 -3
- service/population_pandas.py +1 -1
Dockerfile
CHANGED
@@ -15,9 +15,9 @@ RUN pip install -r requirement.txt
|
|
15 |
ENV PYTHONPATH=/app
|
16 |
|
17 |
# Expose the required port
|
18 |
-
EXPOSE
|
19 |
|
20 |
# Start FastAPI with the correct module path
|
21 |
# CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
22 |
-
CMD ["uvicorn", "
|
23 |
|
|
|
15 |
ENV PYTHONPATH=/app
|
16 |
|
17 |
# Expose the required port
|
18 |
+
EXPOSE 8000
|
19 |
|
20 |
# Start FastAPI with the correct module path
|
21 |
# CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
22 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
23 |
|
main.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from fastapi import FastAPI
|
2 |
-
from
|
3 |
-
from
|
4 |
-
from
|
5 |
|
6 |
app = FastAPI()
|
7 |
|
|
|
1 |
from fastapi import FastAPI
|
2 |
+
from routes.continents import router
|
3 |
+
from logger import logger
|
4 |
+
from routes.continents import router
|
5 |
|
6 |
app = FastAPI()
|
7 |
|
routes/continents.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from fastapi import APIRouter, HTTPException
|
2 |
-
from
|
3 |
-
from
|
4 |
-
from
|
5 |
|
6 |
router = APIRouter()
|
7 |
|
|
|
1 |
from fastapi import APIRouter, HTTPException
|
2 |
+
from service.population_pandas import get_continents, get_continent_data
|
3 |
+
from models.population_models import ContinentResponse, ContinentsListResponse, StatResponse
|
4 |
+
from logger import logger # Import the logger
|
5 |
|
6 |
router = APIRouter()
|
7 |
|
service/population_pandas.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import pandas as pd
|
2 |
# from backend.population_pandas import get_continents, get_continent_data
|
3 |
-
from
|
4 |
|
5 |
import os
|
6 |
|
|
|
1 |
import pandas as pd
|
2 |
# from backend.population_pandas import get_continents, get_continent_data
|
3 |
+
from logger import logger
|
4 |
|
5 |
import os
|
6 |
|