Riorganizza .env.example lasciando solo EXTERNAL_PORT e spostando tutte le altre impostazioni applicative nella UI web. Il mapping della porta in docker-compose.yml ora usa la variabile EXTERNAL_PORT per una personalizzazione più semplice. Rimosse variabili e opzioni avanzate non essenziali dal compose. Aggiornata la documentazione per riflettere la nuova gestione centralizzata delle impostazioni tramite interfaccia web.
44 lines
955 B
YAML
44 lines
955 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
tradingbot:
|
|
container_name: tradingbot
|
|
image: tradingbot:latest
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "${EXTERNAL_PORT:-8080}:8080"
|
|
volumes:
|
|
# Persistenza dati applicazione
|
|
- tradingbot-data:/app/data
|
|
environment:
|
|
# Configurazioni base (non modificabili)
|
|
- ASPNETCORE_ENVIRONMENT=Production
|
|
- ASPNETCORE_URLS=http://+:8080
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 3s
|
|
retries: 3
|
|
start_period: 10s
|
|
networks:
|
|
- tradingbot-network
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '2.0'
|
|
memory: 1G
|
|
reservations:
|
|
cpus: '0.5'
|
|
memory: 256M
|
|
|
|
volumes:
|
|
tradingbot-data:
|
|
driver: local
|
|
|
|
networks:
|
|
tradingbot-network:
|
|
driver: bridge
|