-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.streamlit
More file actions
33 lines (25 loc) · 1.12 KB
/
Dockerfile.streamlit
File metadata and controls
33 lines (25 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Dockerfile
FROM python:3.11-slim-bullseye
WORKDIR /app
COPY requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r ./requirements.txt
# Copy application files
COPY pages ./pages/
# COPY .streamlit ./.streamlit/ # Still optional: if you have other non-secret files from local .streamlit
COPY Dashboard.py .
COPY tomlConfig.sh .
# These ENV are now just build-time defaults IF tomlConfig.sh was run at build,
# or documentation for runtime. With the modified CMD, they are less critical for secrets.toml.
ENV GROQ_API_KEY_ENV="your_default_api_key_buildtime"
ENV DB_HOST_ENV="localhost_buildtime"
ENV DB_USER_ENV="root_buildtime"
ENV DB_PASSWORD_ENV="password_buildtime"
ENV DB_NAME_ENV="db_name_buildtime"
EXPOSE 8502
# Make tomlConfig.sh executable during the build
RUN chmod +x ./tomlConfig.sh
# REMOVE the build-time execution of tomlConfig.sh
# RUN chmod +x tomlConfig.sh && ./tomlConfig.sh <--- REMOVE OR COMMENT THIS LINE
# Modified CMD to run tomlConfig.sh then Streamlit
# This uses the shell form of CMD to allow '&&'
CMD ./tomlConfig.sh && streamlit run Dashboard.py --server.port=8502 --server.address=0.0.0.0