ABDALLALSWAITI commited on
Commit
474609c
·
verified ·
1 Parent(s): 0fdc743

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -33,7 +33,7 @@ RUN apt-get update && apt-get install -y \
33
 
34
  # Create necessary directories with proper permissions
35
  RUN mkdir -p /tmp/.streamlit /app/.streamlit && \
36
- chmod -R 777 /tmp/.streamlit /app/.streamlit
37
 
38
  # Copy package files
39
  COPY requirements.txt ./
@@ -43,6 +43,9 @@ COPY package.json ./
43
  RUN pip3 install -r requirements.txt
44
  RUN npm install
45
 
 
 
 
46
  # Copy application files
47
  COPY puppeteer_pdf.js ./
48
  COPY src/ ./src/
@@ -52,10 +55,12 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
52
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
53
  ENV STREAMLIT_SERVER_HEADLESS=true
54
  ENV STREAMLIT_SERVER_FILE_WATCHER_TYPE=none
 
 
55
  ENV HOME=/tmp
56
 
57
  EXPOSE 8501
58
 
59
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
60
 
61
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
33
 
34
  # Create necessary directories with proper permissions
35
  RUN mkdir -p /tmp/.streamlit /app/.streamlit && \
36
+ chmod -R 777 /tmp/.streamlit /app/.streamlit /tmp
37
 
38
  # Copy package files
39
  COPY requirements.txt ./
 
43
  RUN pip3 install -r requirements.txt
44
  RUN npm install
45
 
46
+ # Copy Streamlit config
47
+ COPY .streamlit/ /app/.streamlit/
48
+
49
  # Copy application files
50
  COPY puppeteer_pdf.js ./
51
  COPY src/ ./src/
 
55
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
56
  ENV STREAMLIT_SERVER_HEADLESS=true
57
  ENV STREAMLIT_SERVER_FILE_WATCHER_TYPE=none
58
+ ENV STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false
59
+ ENV STREAMLIT_SERVER_ENABLE_CORS=false
60
  ENV HOME=/tmp
61
 
62
  EXPOSE 8501
63
 
64
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
65
 
66
+ ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false", "--server.enableCORS=false"]