This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # LeanTo EC2 Deployment Script | |
| # Run this ON the EC2 instance. It installs Docker, configures LeanTo, | |
| # sets up Caddy for HTTPS, and starts everything. | |
| # | |
| # Usage: | |
| # ./deploy/deploy-ec2.sh # Interactive — prompts for values | |
| # ./deploy/deploy-ec2.sh --env .env # Reads values from an env file | |
| # | |
| # Requirements: Amazon Linux 2023, Ubuntu 22+, or Debian 12+ (fresh instance) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :rabbit do | |
| def get_queues | |
| `#{@base_command} list queues | awk '{print$4}' | grep -vw '|' | grep -vw 'name' | awk 'NF'` | |
| end | |
| def get_queues_with_count | |
| `#{@base_command} list queues | awk '{print$18, $4}' | grep -vw '|' | grep -vw 'name' | awk 'NF'` | |
| end |