From 18dea07c06dcd94e3248f4b5d2c9c5a5c0f8e885 Mon Sep 17 00:00:00 2001 From: iwpnd Date: Wed, 29 Jan 2020 13:45:20 +0100 Subject: [PATCH] update readme with installation and tear-down instructions --- README.md | 27 ++++++++++++++++++++++++++- docker-compose.yml | 2 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e6e60d0..d9de3a8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,32 @@ # streamlit-docker-example -Example on how to run and develop a streamlit application inside docker. +Example on how to run and develop a [streamlit](https://github.com/streamlit/streamlit) application inside docker.

streamlit in docker

+ +## Installation + +```bash +git clone https://github.com/iwpnd/streamlit-docker-example.git +cd steamlit-docker-example + +docker-compose up -d --build +``` + +The container will start in detached mode and can now be accessed via [localhost:8501](http://localhost:8501). Whenever you change the app/main.py the steamlit application will update too. If you want to build upon that example, just add your dependencies to the Dockerfile and rebuild the image using docker-compose. + +After you are done, and you want to tear down the application, either + +```bash +docker-compose stop +``` + +to stop the application, or use + +```bash +docker-compose down --rmi all +``` + +to stop the application, remove the stopped containers and optionally `--rmi all` / remove all images associated in the docker-compose.yml file. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index ea4edd2..a7bf310 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.7' services: - api: + app: build: ./ command: streamlit run app/main.py --server.port 8501 volumes: