Files
TradeBot/docker-compose.yml
T

37 lines
876 B
YAML

services:
tradebot:
build: .
container_name: crypto-spot-tradebot
env_file:
- .env
environment:
HOST: 0.0.0.0
PYTHONDONTWRITEBYTECODE: "1"
init: true
read_only: true
pids_limit: 128
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
ports:
- "${TRADEBOT_BIND_ADDRESS:-127.0.0.1}:8787:8787"
volumes:
- ./.env:/app/.env:ro
- ./runtime:/app/runtime
tmpfs:
- /tmp:size=64m,mode=1777
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8787/api/health', timeout=5).read()"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
stop_grace_period: 30s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
restart: unless-stopped