Spaces:
Sleeping
Sleeping
surbi karki commited on
Create docker-compose.yml
Browse files- docker-compose.yml +16 -0
docker-compose.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.9"
|
| 2 |
+
|
| 3 |
+
services:
|
| 4 |
+
fastapi-app:
|
| 5 |
+
image: fastapi-predictor:latest
|
| 6 |
+
build:
|
| 7 |
+
context: .
|
| 8 |
+
dockerfile: Dockerfile
|
| 9 |
+
container_name: fastapi-container
|
| 10 |
+
ports:
|
| 11 |
+
- "8000:8000" # Maps container's port 8000 to host's port 8000
|
| 12 |
+
volumes:
|
| 13 |
+
- ./app:/app # Mounts the app directory for live updates (optional)
|
| 14 |
+
environment:
|
| 15 |
+
- PYTHONUNBUFFERED=1 # Ensures logs are displayed in real-time
|
| 16 |
+
restart: always # Restarts the container automatically in case of failure
|