From 49a00fd5592ed4ff81b441eb06ba4391c840b006 Mon Sep 17 00:00:00 2001 From: Rajtilak Bhattacharjee Date: Mon, 13 Nov 2023 21:20:34 +0530 Subject: [PATCH] feat: introduce Docker setup for app containerization - Added Dockerfile and docker-compose.yml to facilitate the creation of a Docker image for the application, enabling containerization. --- Dockerfile | 20 ++++++++++++++++++++ docker-compose.yml | 10 ++++++++++ 2 files changed, 30 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..149718c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM python:3.10-slim-bullseye + +ENV HOST=0.0.0.0 + +ENV LISTEN_PORT 8080 + +EXPOSE 8080 + +RUN apt-get update && apt-get install -y git + +COPY ./requirements.txt /app/requirements.txt + +RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt + +WORKDIR app/ + +COPY ./src /app/src +COPY ./.streamlit /app/.streamlit + +CMD ["streamlit", "run", "src/main.py", "--server.port", "8080"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7da2b51 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3" +services: +keepyourmouthshut: +image: keepyourmouthshut:latest +build: ./app +command: streamlit run src/main.py --server.port 8080 +volumes: + - ./src/:/app/src +ports: + - 8080:8080