File tree 5 files changed +59
-1
lines changed
5 files changed +59
-1
lines changed Original file line number Diff line number Diff line change
1
+ # Ignore virtual environment directories
2
+ venv /
3
+ __pycache__ /
4
+ * .pyc
5
+ * .pyo
6
+
7
+ # Ignore any local configuration or sensitive files
8
+ .env
9
+ * .log
10
+ * .sqlite
11
+
12
+ # Ignore the Dockerfile and docker-compose files themselves if not needed in the container
13
+ Dockerfile
14
+ docker-compose.yml
15
+
16
+ # Ignore the .git directory
17
+ .git /
Original file line number Diff line number Diff line change
1
+ # Use the official Python 3.11 base image
2
+ FROM python:3.11-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONUNBUFFERED=1
6
+
7
+ # Set the working directory in the container
8
+ WORKDIR /app
9
+
10
+ # Copy the requirements file into the container
11
+ COPY requirements.txt .
12
+
13
+ # Install the required dependencies
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy the rest of the application code into the container
17
+ COPY . .
18
+
19
+ # Expose the port the app will run on
20
+ EXPOSE 8000
21
+
22
+ # Command to run the app using FastAPI's development command
23
+ CMD ["fastapi" , "dev" , "main.py" ]
Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ This API interacts with the JioSaavn website by scraping data and utilizing undo
52
52
* Swagger UI: http://localhost:8000/docs
53
53
* ReDoc: http://localhost:8000/redoc
54
54
55
+ or use Docker via
56
+ ``` bash
57
+ docker-compose up --build
58
+ ```
59
+
55
60
## API Endpoints
56
61
57
62
** Songs:**
Original file line number Diff line number Diff line change
1
+ version : ' 3.9'
2
+
3
+ services :
4
+ app :
5
+ build : .
6
+ container_name : jiosaavn-api
7
+ ports :
8
+ - " 8000:8000"
9
+ volumes :
10
+ - .:/app
11
+ environment :
12
+ - PYTHONUNBUFFERED=1
13
+ restart : unless-stopped
Original file line number Diff line number Diff line change 1
- fastapi == 0.115.6
1
+ fastapi [ standard ] == 0.115.6
2
2
Markdown == 3.7
3
3
pydantic == 2.10.3
4
4
pydantic_settings == 2.6.1
You can’t perform that action at this time.
0 commit comments