Skip to content

Commit

Permalink
Merge pull request #60 from RandomSummer/main
Browse files Browse the repository at this point in the history
Adding Dockerfile and docker-compose.yml files (Tested)
  • Loading branch information
Devanik21 authored Oct 18, 2024
2 parents 8975c3d + fb7159e commit 6c34b64
Show file tree
Hide file tree
Showing 5 changed files with 832 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
**/__pycache__
**/.venv
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/bin
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# app/Dockerfile

FROM python:3.10-slim

WORKDIR /app

RUN apt-get update && apt-get install -y \
build-essential \
portaudio19-dev \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*

COPY requirements.txt /app/

RUN pip3 install -r requirements.txt

COPY . /app

EXPOSE 8501

HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

ENTRYPOINT ["streamlit", "run", "Home.py"]
11 changes: 11 additions & 0 deletions docker-compose.debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.4'

services:
isrominingsitefinalapp:
image: isrominingsitefinalapp
build:
context: .
dockerfile: ./Dockerfile
command: ["sh", "-c", "pip install debugpy -t /tmp && python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 Home.py "]
ports:
- 5678:5678
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3'

services:
webapp:
build:
context: .
dockerfile: Dockerfile # Path to the Dockerfile
ports:
- "8501:8501" # Expose the container's port 8501 to the host
environment:
- PYTHONUNBUFFERED=1 # Ensures logs are immediately flushed to stdout
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8501/_stcore/health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
- .:/app # Mount the current directory to /app in the container
Loading

0 comments on commit 6c34b64

Please sign in to comment.