Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
50a664d8ee
commit
72da65721a
17
Dockerfile
Normal file
17
Dockerfile
Normal 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"]
|
||||||
@ -1,8 +1,10 @@
|
|||||||
services:
|
services:
|
||||||
maneshtrader:
|
maneshtrader:
|
||||||
image: python:3.11-slim
|
image: maneshtrader:latest
|
||||||
container_name: maneshtrader2
|
pull_policy: build
|
||||||
working_dir: /app
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "${APP_PORT:-8502}:8502"
|
- "${APP_PORT:-8502}:8502"
|
||||||
@ -12,14 +14,13 @@ services:
|
|||||||
PIP_NO_CACHE_DIR: "1"
|
PIP_NO_CACHE_DIR: "1"
|
||||||
STREAMLIT_BROWSER_GATHER_USAGE_STATS: "false"
|
STREAMLIT_BROWSER_GATHER_USAGE_STATS: "false"
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/app
|
- maneshtrader_data:/root/.web_local_shell
|
||||||
- ./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"
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8502/_stcore/health', timeout=3)\" || exit 1"]
|
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
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
start_period: 45s
|
start_period: 45s
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
maneshtrader_data:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user