Application Deployment
Deploy Relvy application on EC2 instance using Docker
Application Deployment - Install Docker, configure environment, and deploy the Relvy application on your EC2 instance.
Overview
This section guides you through deploying the Relvy application on your EC2 instance. We’ll install Docker, configure environment variables, and deploy the application using docker-compose.
Deployment Components
Docker Installation
Install Docker and Docker Compose on EC2
Repository Setup
Clone Relvy repository and configure files
Environment Configuration
Set up environment variables and configuration
Application Launch
Deploy and start the Relvy application
Prerequisites
Before deploying the application, ensure you have:
- ✅ AWS Infrastructure - EC2 instance running and accessible
- ✅ Domain Configuration - SSL certificate and DNS records configured
- ✅ Database Access - RDS endpoint and credentials
- ✅ Slack Integration - App credentials (if using Slack)
- ✅ SSH Access - EC2 key pair and SSH access
Step 1: SSH into EC2 Instance
Step 2: Install Docker and Docker Compose
2.1 Install Docker
Run the following script to install Docker and Docker Compose:
Important - You must log out and log back in for the docker group changes to take effect.
Step 3: Clone Relvy Repository
3.1 Clone Repository
3.2 Verify Repository Contents
Docker Compose Services - The deployment includes Redis, database migrations, Celery worker, and web application services.
Step 4: Configure Environment Variables
4.1 Create Environment File
4.2 Configure Required Variables
Set the following environment variables in your .env
file:
4.3 Environment Variable Reference
Variable | Description | Required | Example |
---|---|---|---|
SERVER_HOSTNAME | Your domain name | Yes | relvy.yourcompany.com |
POSTGRES_PASSWORD | Database password | Yes | SecurePassword123! |
POSTGRES_ENDPOINT | RDS endpoint | Yes | relvy-db.xxxxx.us-west-2.rds.amazonaws.com |
POSTGRES_USER | Database username | No (default: postgres) | postgres |
POSTGRES_DB | Database name | No (default: relvydb) | relvydb |
SLACK_CLIENT_ID | Slack app client ID | No | 123456789.123456789 |
SLACK_CLIENT_SECRET | Slack app client secret | No | abc123def456... |
Step 5: Docker Login
5.1 Login to Docker Registry
Note - Contact us to request an access token for Docker registry access.
Step 6: Deploy Application
6.1 Pull Docker Images
6.2 Start Application
6.3 Monitor Application Startup
Startup Time - The application may take 2-5 minutes to fully start up. Monitor logs for any errors.
Step 7: Verify Deployment
7.1 Check Application Health
7.2 Verify Database Connection
7.3 Check Service Status
Step 8: Configure Application
8.1 Access Application
- Open your browser
- Navigate to
https://yourdomain.com
- You should see the Relvy landing page
8.2 Initial Setup
Follow the on-screen instructions to:
- Create your first user account
- Configure basic settings
- Set up initial integrations
Troubleshooting
Common Issues
Issue | Solution |
---|---|
Docker permission denied | Log out and back in, or run newgrp docker |
Database connection failed | Verify RDS endpoint and security group rules |
Application not starting | Check logs with docker-compose logs -f |
Domain not accessible | Verify DNS records and load balancer configuration |
SSL certificate errors | Check certificate validation and ALB configuration |
Debug Commands
Performance Monitoring
Application Management
8.1 Start/Stop Application
8.2 Update Application
Deployment Complete - Your Relvy application is now deployed and running! Keep track of:
- Application URL: https://yourdomain.com
Next Steps
Your Relvy application is now deployed! The next steps are:
- Complete Initial Setup - Configure users and settings in Initial Setup
- Test Integration - Verify Slack integration (if configured)
- Monitor Performance - Set up monitoring and alerting
Deployment Successful - Relvy is now running on your infrastructure and ready for incident response workflows.