Skip to main content
FootyCollect can be deployed to production using either Docker Compose or directly on a VPS (bare metal). This section guides you through both deployment methods, environment configuration, and production best practices.

Deployment Options

Choose the deployment method that best fits your infrastructure:

Docker Production

Deploy the full stack with Docker Compose including Django, PostgreSQL, Redis, Traefik, and Celery workers

Bare Metal VPS

Deploy directly on Ubuntu/Debian servers using Nginx, Gunicorn, and systemd services

Architecture Overview

FootyCollect production deployment consists of these core components:

Core Services

Requirements

System Requirements

  • Docker Engine 20.10+
  • Docker Compose v2+
  • 2GB RAM minimum (4GB recommended)
  • 20GB disk space
  • Ubuntu 20.04+ or Debian 11+

External Services

Domain Required: You need a domain name for SSL certificates. Let’s Encrypt cannot issue certificates for IP addresses.

Quick Start

1

Choose Deployment Method

Select either Docker production for containerized deployment or bare metal for traditional VPS deployment.
2

Configure Environment

Set up production environment variables following the environment setup guide. Generate a secure SECRET_KEY and configure database, Redis, email, and storage.
3

Deploy Application

Follow the deployment guide for your chosen method. Both guides include database setup, static file collection, and SSL configuration.
4

Verify Deployment

Complete the production checklist to ensure all security settings are configured and run Django’s deployment checks.

Static and Media Files

In production, FootyCollect serves static and media files from S3-compatible storage:

Storage Options

Configure AWS S3 for production static and media files:
Static files are uploaded during deployment with collectstatic.
Configure Cloudflare R2 for cost-effective S3-compatible storage:
R2 offers free egress bandwidth with S3-compatible API.

Security Considerations

Critical Security SettingsNever deploy to production without configuring these settings:
  • DEBUG=False - Prevents sensitive information exposure
  • Strong SECRET_KEY - Generate with Django’s get_random_secret_key()
  • ALLOWED_HOSTS - Restrict to your domain(s)
  • SECURE_SSL_REDIRECT=True - Force HTTPS
  • SSL/TLS certificates - Use Let’s Encrypt (free)

Security Checklist

  • DEBUG disabled (DEBUG=False)
  • Unique SECRET_KEY generated and secured
  • ALLOWED_HOSTS configured with actual domain(s)
  • SSL/TLS certificates installed
  • Firewall configured (UFW or similar)
  • Fail2ban enabled for SSH protection
  • Strong database password set
  • Regular security updates enabled
  • Sentry configured for error tracking
  • Database backups automated
See the production checklist for the complete security configuration.

Monitoring and Health Checks

FootyCollect includes built-in health check endpoints:

Django Deployment Checks

Run Django’s built-in deployment checks before going live:
This validates:
  • DEBUG is disabled
  • SECRET_KEY is secure
  • ALLOWED_HOSTS is configured
  • Database connectivity
  • Redis connectivity
  • SSL/HTTPS settings
  • Storage credentials (S3/R2)
See config/checks.py:1 for all production validation checks.

Database Backups

Both deployment methods include automatic database backups: Docker: Uses the awscli container for automated backups to S3 Bare Metal: Automated backups during deployment via deploy.sh

Manual Backup

Next Steps

Docker Deployment

Deploy with Docker Compose for containerized production environment

Bare Metal Deployment

Deploy on Ubuntu/Debian VPS with Nginx and Gunicorn

Environment Setup

Configure production environment variables and secrets

Production Checklist

Complete pre-deployment security and configuration checklist

Support

For deployment issues:
  • Check the troubleshooting sections in Docker or bare metal guides
  • Review deployment logs and Django checks
  • Open an issue on GitHub