Skip to main content

Production deployment guide

Deploy your Screenshothis instance to production with confidence. This comprehensive guide covers deployment strategies for Docker, Kubernetes, and major cloud platforms, along with security, monitoring, and scaling considerations.
Stay updated: Always check the Screenshothis repository for the latest deployment instructions and platform-specific requirements.

Pre-deployment checklist

Ensure you have everything ready before deploying to production:
1

Infrastructure prerequisites

Database: Set up a managed PostgreSQL instance or prepare to self-host Cache: Configure Redis for session management and caching Storage: Choose and configure an S3-compatible storage service Domain: Secure your domain name and SSL certificates
2

Security requirements

Environment variables: Configure all required settings for production Secrets: Generate strong, unique secrets for authentication and encryption Access control: Set up proper IAM roles and security groups
3

Monitoring setup

Logging: Prepare centralized logging solution Metrics: Set up application and infrastructure monitoring Alerts: Configure alerts for critical system events Health checks: Plan your health check and uptime monitoring strategy

Docker deployment

Choose the Docker deployment strategy that best fits your infrastructure needs:

Single container deployment

Deploy quickly with a single Docker container for small to medium workloads:
1

Build your application

2

Run in production

Your application should be accessible at http://your-server:3000
3

Verify deployment

Multi-container deployment with Docker Compose

Deploy a complete production stack with database, cache, and reverse proxy:
1

Create production compose file

Save this as docker-compose.prod.yml:
2

Deploy the stack

3

Verify deployment

All services should report healthy status and respond to connection tests

NGINX reverse proxy configuration

Configure NGINX as a reverse proxy with SSL termination and optimizations:
1

Create NGINX configuration

Save this as nginx.conf:
2

Obtain SSL certificates

Set up SSL certificates using Let’s Encrypt:
3

Test configuration

You should see SSL certificate information and successful proxy responses

Kubernetes deployment

Deploy Screenshothis on Kubernetes for enterprise-grade scalability and reliability:
1

Create namespace and configuration

Set up the Kubernetes namespace and configuration:
2

Configure secrets

Create secrets for sensitive configuration:
Replace all placeholder values with your actual production credentials. Never commit secrets to version control.
3

Apply base configuration

Application deployment and services

Create the main application deployment with service and ingress:
1

Create deployment manifest

Save this as k8s/deployment.yaml:
2

Deploy to cluster

3

Verify deployment

All pods should be in “Running” status and health checks should pass

Cloud platform deployments

Deploy to popular cloud platforms with platform-specific optimizations:
Deploy on AWS using EC2, RDS, and ElastiCache for a fully managed solution:
1

Set up infrastructure

2

Create managed services

3

Deploy application

Production configuration

Configure your environment variables for optimal production performance:

Essential environment variables

Generate a secure BETTER_AUTH_SECRET using: openssl rand -base64 32

SSL/TLS configuration

Secure your deployment with proper SSL/TLS certificates:

Monitoring and Logging

Health Checks

The application provides several health check endpoints:
  • /health - Basic health check
  • /health/live - Liveness probe
  • /health/ready - Readiness probe

Prometheus Metrics

Log Management

Scaling Considerations

Horizontal Scaling

Database Scaling

  • Use read replicas for read-heavy workloads
  • Consider connection pooling (PgBouncer)
  • Monitor query performance

Redis Scaling

  • Use Redis Cluster for high availability
  • Consider Redis Sentinel for failover

Backup and Recovery

Database Backups

Application Data Backup

Security Hardening

Firewall Configuration

Docker Security

Troubleshooting Deployment Issues

Common deployment problems and solutions:

Port Binding Issues

Database Connection Issues

Storage Issues

Next steps

Complete your deployment with these essential guides:

Configuration Guide

Optimize your production configuration with detailed parameter references and best practices

Troubleshooting Guide

Solve common deployment issues with step-by-step diagnostic and resolution procedures

API Documentation

Integrate with your applications using comprehensive API references and examples

Community Support

Join discussions, ask questions, and get help from the community

Deployment checklist

Ensure your deployment is production-ready:
  • Security: SSL certificates configured and auto-renewal set up
  • Monitoring: Health checks and logging configured
  • Backup: Database backup strategy implemented
  • Scaling: Resource limits and auto-scaling configured
  • Testing: All endpoints tested and responding correctly
  • Documentation: Internal deployment docs updated

Getting help

  • Application won’t start: Check environment variables and logs
  • Database connection failed: Verify connection strings and credentials
  • SSL certificate issues: Ensure proper certificate installation and renewal
  • Performance problems: Review resource allocation and scaling settings