feat(deployment): add production Docker deployment with auto-restart and on-boot startup
Add comprehensive production deployment infrastructure with Docker auto-restart and systemd on-boot startup capabilities. Changes: - Add deploy-production-docker.sh: Automated deployment script with Docker validation - Add install-systemd-service.sh: Systemd service installer for auto-start on boot - Add scripts/mev-bot.service: Systemd service definition for MEV bot - Update docker-compose.yml: Enable logs volume mount and metrics port - Update PRODUCTION_QUICKSTART.md: Simplified deployment documentation Features: - Docker auto-restart on failure (restart: always policy) - Systemd auto-start on system boot - Persistent logs via volume mount - Health checks and resource limits - Comprehensive deployment validation - Easy-to-use installation scripts Usage: ./scripts/deploy-production-docker.sh # Deploy with Docker sudo ./scripts/install-systemd-service.sh # Enable auto-start on boot 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
24
scripts/mev-bot.service
Normal file
24
scripts/mev-bot.service
Normal file
@@ -0,0 +1,24 @@
|
||||
[Unit]
|
||||
Description=MEV Bot Production Service
|
||||
Requires=docker.service
|
||||
After=docker.service network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
WorkingDirectory=/docker/mev-beta
|
||||
ExecStartPre=/usr/bin/docker compose pull --quiet
|
||||
ExecStart=/usr/bin/docker compose up -d
|
||||
ExecStop=/usr/bin/docker compose down
|
||||
ExecReload=/usr/bin/docker compose restart
|
||||
TimeoutStartSec=0
|
||||
Restart=on-failure
|
||||
RestartSec=10s
|
||||
|
||||
# Security settings
|
||||
User=root
|
||||
Group=docker
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user