Spaces:
Running
Running
James McCool
commited on
Commit
·
5896804
1
Parent(s):
0f5984c
Refactor Dockerfile to streamline MongoDB URI configuration by replacing the creation of .streamlit directory with a git initialization and remote setup using a secret for the MongoDB URI.
Browse files- Dockerfile +3 -4
Dockerfile
CHANGED
@@ -12,10 +12,9 @@ RUN apt-get update && apt-get install -y \
|
|
12 |
COPY requirements.txt ./
|
13 |
COPY src/ ./src/
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
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 |
|
|
|
12 |
COPY requirements.txt ./
|
13 |
COPY src/ ./src/
|
14 |
|
15 |
+
RUN --mount=type=secret,id=mongo_uri,mode=0444,required=true \
|
16 |
+
git init && \
|
17 |
+
git remote add origin $(cat /run/secrets/mongo_uri)
|
|
|
18 |
|
19 |
RUN pip3 install -r requirements.txt
|
20 |
|