Jatin Mehra commited on
Commit
4e55398
·
1 Parent(s): 0594054
Files changed (1) hide show
  1. Dockerfile +8 -2
Dockerfile CHANGED
@@ -10,8 +10,14 @@ COPY requirements.txt .
10
  # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy the secrets.toml file into the .streamlit directory
14
- COPY secrets.toml /app/.streamlit/secrets.toml
 
 
 
 
 
 
15
 
16
  # Copy the rest of the application code into the container
17
  COPY . .
 
10
  # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Create the directory for Streamlit secrets
14
+ RUN mkdir -p /app/.streamlit
15
+
16
+ # Accept the secret token as a build argument
17
+ ARG SECRET_TOKEN
18
+
19
+ # Create the secrets.toml file with the token
20
+ RUN echo "[general]\nemail = \"[email protected]\"\n\n[api]\ntoken = \"$SECRET_TOKEN\"" > /app/.streamlit/secrets.toml
21
 
22
  # Copy the rest of the application code into the container
23
  COPY . .