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.
This commit is contained in:
parent
e6e4300c91
commit
49a00fd559
|
@ -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"]
|
|
@ -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
|
Loading…
Reference in New Issue