Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2026-02-23 21:33:39 -06:00
parent 50a664d8ee
commit 72da65721a
2 changed files with 26 additions and 8 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install -r /app/requirements.txt
COPY . /app
EXPOSE 8502
CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=8502", "--server.headless=true"]

View File

@ -1,8 +1,10 @@
services:
maneshtrader:
image: python:3.11-slim
container_name: maneshtrader2
working_dir: /app
image: maneshtrader:latest
pull_policy: build
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "${APP_PORT:-8502}:8502"
@ -12,14 +14,13 @@ services:
PIP_NO_CACHE_DIR: "1"
STREAMLIT_BROWSER_GATHER_USAGE_STATS: "false"
volumes:
- ./:/app
- ./data:/root/.web_local_shell
command: >
sh -c "pip install -r requirements.txt &&
streamlit run app.py --server.address=0.0.0.0 --server.port=8502 --server.headless=true"
- maneshtrader_data:/root/.web_local_shell
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8502/_stcore/health', timeout=3)\" || exit 1"]
interval: 30s
timeout: 5s
retries: 5
start_period: 45s
volumes:
maneshtrader_data: