Update Dockerfile
Browse files- Dockerfile +2 -2
Dockerfile
CHANGED
|
@@ -55,10 +55,10 @@ COPY --chown=user . $HOME/app
|
|
| 55 |
|
| 56 |
# Mount the secret and set it as an environment variable
|
| 57 |
RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
|
| 58 |
-
bash -c 'cat /run/secrets/OPENAI_API_KEY
|
| 59 |
|
| 60 |
# Make port 7860 available to the world outside this container
|
| 61 |
EXPOSE 7860
|
| 62 |
|
| 63 |
# Run app.py when the container launches
|
| 64 |
-
CMD ["bash", "-c", "source
|
|
|
|
| 55 |
|
| 56 |
# Mount the secret and set it as an environment variable
|
| 57 |
RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
|
| 58 |
+
bash -c 'export OPENAI_API_KEY=$(cat /run/secrets/OPENAI_API_KEY) && echo "export OPENAI_API_KEY=$OPENAI_API_KEY" >> /etc/environment'
|
| 59 |
|
| 60 |
# Make port 7860 available to the world outside this container
|
| 61 |
EXPOSE 7860
|
| 62 |
|
| 63 |
# Run app.py when the container launches
|
| 64 |
+
CMD ["bash", "-c", "source /etc/environment && python3 -m streamlit run app.py --server.port=7860 --server.address=0.0.0.0 --server.enableXsrfProtection=false"]
|