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
.streamlitin the root of the cloned repository -
Create a file
secrets.tomlinside.streamlitdirectory with contents like:[connections.default] account = "<accountName>" user = "<userName>" password = "<superSecretPassword>" warehouse = "<whName>" role = "<role>" # Any role with access to ACCOUNT_USAGESee 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)/.streamlitwith a path to the directory containing Streamlit secrets toml file if using a different secrets location.--publish-allwill assign a random port to the container; you can usedocker psto determine which port is forwarded to8501inside 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:55000in your browser