surbi karki commited on
Commit
9b38ef0
·
verified ·
1 Parent(s): 51b7ac1

Create docker-compose.yml

Browse files
Files changed (1) hide show
  1. 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