Brightsun10 commited on
Commit
f645cf1
·
verified ·
1 Parent(s): 405fdac

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -2
Dockerfile CHANGED
@@ -7,7 +7,10 @@ RUN pip install --no-cache-dir -r requirements.txt
7
 
8
  COPY . .
9
 
10
- # Make sure the SQLite DB file is writable
11
- RUN touch expenses.db && chmod 666 expenses.db
 
 
 
12
 
13
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
7
 
8
  COPY . .
9
 
10
+ # Make sure /data folder exists and is writable
11
+ RUN mkdir -p /data && chmod 777 /data
12
+
13
+ # ✅ Set environment variable so SQLite DB uses /data/expenses.db
14
+ ENV DB_PATH=/data/expenses.db
15
 
16
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]