Critical fixes to ensure smooth deployments and prevent future outages: **docker-compose.yml:** - Fixed image name: littleshop:latest → localhost:5000/littleshop:latest - Fixed subnet: 172.21.0.0/16 → 172.23.0.0/16 (matches production) - Fixed environment: Production → Development (matches current production) **.gitlab-ci.yml:** - Fixed TeleBot API URL: http://littleshop-admin:8080 → http://littleshop:5000 - Removed duplicate network flag (was causing issues) - Added explicit network connection command for littleshop_littleshop-network - Ensures TeleBot can communicate with LittleShop API on deployment **CLAUDE.md:** - Documented October 4, 2025 incident and recovery - Added comprehensive deployment best practices - Documented pre-deployment checklist - Added manual deployment commands for emergencies - Documented network architecture and container configuration **Root Cause of Previous Failure:** TeleBot was trying to connect to non-existent hostname "littleshop-admin" on wrong network, causing authentication failures and data unavailability. **Verification:** All changes tested in production and confirmed working. TeleBot now successfully authenticates and communicates with LittleShop API. 🤖 Generated with Claude Code https://claude.com/claude-code Co-Authored-By: Claude <noreply@anthropic.com>
58 lines
2.0 KiB
YAML
58 lines
2.0 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
littleshop:
|
|
build: .
|
|
image: localhost:5000/littleshop:latest
|
|
container_name: littleshop
|
|
restart: unless-stopped
|
|
ports:
|
|
- "127.0.0.1:5100:5000" # Bind only to localhost
|
|
environment:
|
|
- ASPNETCORE_ENVIRONMENT=Development
|
|
- ASPNETCORE_URLS=http://+:5000
|
|
- ConnectionStrings__DefaultConnection=Data Source=/app/data/littleshop-production.db
|
|
- Jwt__Key=${JWT_SECRET_KEY:-7ndUULT7XWE78uxfZ9xO4t6/JhXRzCQ23wCN/R1foDPpb0dv06qe4TuGsRLLV5q+}
|
|
- Jwt__Issuer=LittleShop-Production
|
|
- Jwt__Audience=LittleShop-Production
|
|
- Jwt__ExpiryInHours=24
|
|
- SilverPay__BaseUrl=${SILVERPAY_URL:-http://31.97.57.205:8001}
|
|
- SilverPay__ApiKey=${SILVERPAY_API_KEY:-7703aa7a62fa4b40a87e9cfd867f5407147515c0986116ea54fc00c0a0bc30d8}
|
|
- SilverPay__WebhookSecret=${SILVERPAY_WEBHOOK_SECRET:-04126be1b2ca9a586aaf25670c0ddb7a9afa106158074605a1016a2889655c20}
|
|
- SilverPay__DefaultWebhookUrl=${SILVERPAY_WEBHOOK_URL:-http://srv1002428.hstgr.cloud/api/orders/payments/webhook}
|
|
- SilverPay__AllowUnsignedWebhooks=false
|
|
- WebPush__VapidPublicKey=BDJtQu7zV0H3KF4FkrZ8nPwP3YD_3cEz3hqJvQ6L_gvNpG8ANksQB-FZy2-PDmFAu6duiN4p3mkcNAGnN4YRbws
|
|
- WebPush__VapidPrivateKey=Hm_ttUKUqoLn5R8WQP5O1SIGxm0kVJXMZGCPMD1tUDY
|
|
- WebPush__VapidSubject=mailto:admin@littleshop.local
|
|
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/catalog/products"]
|
|
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
|
|
ipam:
|
|
config:
|
|
- subnet: 172.23.0.0/16 |