Docker container
These instructions will set up a Docker container with the application.
-
Clone the source code and change current directory to its root
-
Create a directory
.streamlit
in the root of the cloned repository -
Create a file
secrets.toml
inside.streamlit
directory with contents like:[connections.default] account = "<accountName>" user = "<userName>" password = "<superSecretPassword>" warehouse = "<whName>" role = "<role>" # Any role with access to ACCOUNT_USAGE
See more information on the Streamlit secrets here.
-
Build and run the docker image:
$ docker build . -t sentry:latest -f deployment_models/local-docker/Dockerfile ... naming to docker.io/library/sentry:latest $ docker run --rm --mount type=bind,source=$(pwd)/.streamlit,target=/app/.streamlit,readonly --publish-all sentry:latest ... You can now view your Streamlit app in your browser. ...
Replace
$(pwd)/.streamlit
with a path to the directory containing Streamlit secrets toml file if using a different secrets location.--publish-all
will assign a random port to the container; you can usedocker ps
to determine which port is forwarded to8501
inside the container. -
(if needed) find out the port that Docker assigned to the container using
docker ps
:$ docker ps --format "{{.Image}}\t{{.Ports}}" sentry:latest 0.0.0.0:55000->8501/tcp
-
Open
http://localhost:55000
in your browser