Spaces:
Running
Running
James McCool
commited on
Commit
·
8a35566
1
Parent(s):
dbfbd84
Remove .gitignore file and update Dockerfile to create .streamlit directory and add MongoDB URI secrets configuration.
Browse files- .gitignore +0 -39
- Dockerfile +5 -0
.gitignore
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
# Python
|
2 |
-
__pycache__/
|
3 |
-
*.py[cod]
|
4 |
-
*$py.class
|
5 |
-
*.so
|
6 |
-
.Python
|
7 |
-
env/
|
8 |
-
build/
|
9 |
-
develop-eggs/
|
10 |
-
dist/
|
11 |
-
downloads/
|
12 |
-
eggs/
|
13 |
-
.eggs/
|
14 |
-
lib/
|
15 |
-
lib64/
|
16 |
-
parts/
|
17 |
-
sdist/
|
18 |
-
var/
|
19 |
-
wheels/
|
20 |
-
*.egg-info/
|
21 |
-
.installed.cfg
|
22 |
-
*.egg
|
23 |
-
|
24 |
-
# Virtual Environment
|
25 |
-
venv/
|
26 |
-
ENV/
|
27 |
-
|
28 |
-
# IDE
|
29 |
-
.idea/
|
30 |
-
.vscode/
|
31 |
-
*.swp
|
32 |
-
*.swo
|
33 |
-
|
34 |
-
# Streamlit
|
35 |
-
.streamlit/secrets.toml
|
36 |
-
|
37 |
-
# OS
|
38 |
-
.DS_Store
|
39 |
-
Thumbs.db
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dockerfile
CHANGED
@@ -12,6 +12,11 @@ RUN apt-get update && apt-get install -y \
|
|
12 |
COPY requirements.txt ./
|
13 |
COPY src/ ./src/
|
14 |
|
|
|
|
|
|
|
|
|
|
|
15 |
RUN pip3 install -r requirements.txt
|
16 |
|
17 |
EXPOSE 8501
|
|
|
12 |
COPY requirements.txt ./
|
13 |
COPY src/ ./src/
|
14 |
|
15 |
+
# Create .streamlit directory and secrets.toml with the MongoDB URI
|
16 |
+
RUN mkdir -p .streamlit
|
17 |
+
RUN --mount=type=secret,id=MONGODB_URI,mode=0444,required=true \
|
18 |
+
echo "mongo_uri = \"$(cat /run/secrets/MONGODB_URI)\"" > "mongodb+srv://multichem:[email protected]/?retryWrites=true&w=majority"
|
19 |
+
|
20 |
RUN pip3 install -r requirements.txt
|
21 |
|
22 |
EXPOSE 8501
|