maneshtrader/docker-compose.yml

26 lines
812 B
YAML

services:
maneshtrader:
image: python:3.11-slim
container_name: maneshtrader
working_dir: /app
restart: unless-stopped
ports:
- "${APP_PORT:-8501}:8501"
environment:
PYTHONDONTWRITEBYTECODE: "1"
PYTHONUNBUFFERED: "1"
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=8501 --server.headless=true"
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8501/_stcore/health', timeout=3)\" || exit 1"]
interval: 30s
timeout: 5s
retries: 5
start_period: 45s