DevForML commited on
Commit
8664c41
·
verified ·
1 Parent(s): d8559f0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -2,20 +2,20 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- RUN apt-get update && apt-get install -y gcc
 
 
6
 
7
- # Install deps
8
  COPY requirements.txt .
9
  RUN pip install --upgrade pip \
10
  && pip install -r requirements.txt
11
 
12
- # Copy your code
13
  COPY . /app
14
 
15
- # Create and set perms on application folders
16
  RUN mkdir -p /app/cache /app/uploads /app/data /app/chats \
17
- && chmod -R 755 /app/cache /app/uploads /app/data /app/chats \
18
- && chmod -R 755 /app
19
 
20
  ENV FLASK_APP=app.py \
21
  FLASK_ENV=production
 
2
 
3
  WORKDIR /app
4
 
5
+ # 1) Install OS + Python deps
6
+ RUN apt-get update && apt-get install -y gcc \
7
+ && rm -rf /var/lib/apt/lists/*
8
 
 
9
  COPY requirements.txt .
10
  RUN pip install --upgrade pip \
11
  && pip install -r requirements.txt
12
 
13
+ # 2) Copy your application (creates /app/chats if it's in your repo)
14
  COPY . /app
15
 
16
+ # 3) Ensure runtime dirs exist & are writable
17
  RUN mkdir -p /app/cache /app/uploads /app/data /app/chats \
18
+ && chmod -R 777 /app/cache /app/uploads /app/data /app/chats
 
19
 
20
  ENV FLASK_APP=app.py \
21
  FLASK_ENV=production