frank0957 commited on
Commit
334046f
Β·
verified Β·
1 Parent(s): 9690848

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -6
Dockerfile CHANGED
@@ -2,24 +2,27 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system tools (curl for health check testing, optional)
 
 
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  curl \
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- # Copy requirements and install dependencies
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- # Copy all source code
15
  COPY . .
16
 
17
- # Ensure startup script is executable
18
  RUN chmod +x startup.sh
 
19
 
20
- # Create wiki directory if it doesn't exist
21
  RUN mkdir -p wiki
22
 
23
  EXPOSE 7860
24
-
25
  CMD ["./startup.sh"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # ── Install system dependencies ────────────────────
6
+ # curl: useful for health checks and debugging
7
+ # git: required by backup.sh to push data to GitHub
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
  curl \
10
+ git \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # ── Python dependencies ───────────────────────────
14
  COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # ── Copy application code ─────────────────────────
18
  COPY . .
19
 
20
+ # ── Ensure startup scripts are executable ─────────
21
  RUN chmod +x startup.sh
22
+ RUN chmod +x backup.sh
23
 
24
+ # ── Create wiki directory ─────────────────────────
25
  RUN mkdir -p wiki
26
 
27
  EXPOSE 7860
 
28
  CMD ["./startup.sh"]