sam12555 commited on
Commit
2f46a26
·
verified ·
1 Parent(s): fc131fc

Update docker-compose.yml

Browse files
Files changed (1) hide show
  1. docker-compose.yml +33 -0
docker-compose.yml CHANGED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.8'
2
+
3
+ services:
4
+ mirrormind-api:
5
+ build: .
6
+ ports:
7
+ - "8000:8000"
8
+ volumes:
9
+ - ./mirror_model.pth:/app/mirror_model.pth:ro
10
+ - ./logs:/app/logs
11
+ environment:
12
+ - PYTHONUNBUFFERED=1
13
+ - CUDA_VISIBLE_DEVICES=0 # Set to empty string to disable GPU
14
+ restart: unless-stopped
15
+ healthcheck:
16
+ test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
17
+ interval: 30s
18
+ timeout: 10s
19
+ retries: 3
20
+ start_period: 40s
21
+
22
+ # Optional: Add Nginx reverse proxy
23
+ nginx:
24
+ image: nginx:alpine
25
+ ports:
26
+ - "80:80"
27
+ - "443:443"
28
+ volumes:
29
+ - ./nginx.conf:/etc/nginx/nginx.conf:ro
30
+ - ./ssl:/etc/nginx/ssl:ro # SSL certificates if needed
31
+ depends_on:
32
+ - mirrormind-api
33
+ restart: unless-stopped