- Added complete docker-compose.yml for both LittleShop and TeleBot - Proper network configuration (littleshop-network + silverpay-network) - Correct port mappings (5100:5000 for host access, 5000 internal) - Health checks with service dependencies - Volume management for data, uploads, and logs - Enhanced DEPLOYMENT.md with comprehensive guide - Quick deploy using docker-compose - Manual deployment alternative - Network architecture diagram - Troubleshooting common networking issues - Database management commands - Environment configuration details - Production deployment checklist This prevents recurring network and port configuration issues by providing declarative infrastructure-as-code deployment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
75 lines
1.8 KiB
YAML
75 lines
1.8 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
littleshop:
|
|
build: .
|
|
image: littleshop:latest
|
|
container_name: littleshop
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5100:5000" # Host:Container
|
|
environment:
|
|
- ASPNETCORE_ENVIRONMENT=Production
|
|
- ASPNETCORE_URLS=http://+:5000
|
|
- ConnectionStrings__DefaultConnection=Data Source=/app/data/littleshop-prod.db
|
|
- Jwt__Key=LittleShop-Production-JWT-SecretKey-32Characters-2025
|
|
- Jwt__Issuer=LittleShop
|
|
- Jwt__Audience=LittleShop
|
|
volumes:
|
|
- littleshop-data:/app/data
|
|
- littleshop-uploads:/app/wwwroot/uploads
|
|
- littleshop-logs:/app/logs
|
|
networks:
|
|
- littleshop-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5000/api/version"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
telebot:
|
|
image: telebot:latest
|
|
container_name: telebot-service
|
|
restart: unless-stopped
|
|
environment:
|
|
- ASPNETCORE_ENVIRONMENT=Production
|
|
- LittleShop__ApiUrl=http://littleshop:5000
|
|
- LittleShop__UseTor=false
|
|
- Telegram__BotToken=${TELEGRAM_BOT_TOKEN}
|
|
networks:
|
|
- littleshop-network
|
|
- silverpay-network
|
|
depends_on:
|
|
littleshop:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "ps aux | grep dotnet || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
volumes:
|
|
littleshop-data:
|
|
driver: local
|
|
littleshop-uploads:
|
|
driver: local
|
|
littleshop-logs:
|
|
driver: local
|
|
|
|
networks:
|
|
littleshop-network:
|
|
driver: bridge
|
|
silverpay-network:
|
|
external: true |