Skip to main content

Deployment

Overview

SpeedPy is designed for Docker-based deployment. The recommended platform is Appliku, which deploys on your own servers for significant cost savings.

Docker

Dockerfile

SpeedPy uses a python:3.13.12-trixie base image with Node.js 25.6 installed via NVM and uv for dependency management:

FROM python:3.13.12-trixie
# Node.js installed via NVM
ENV NODE_VERSION=25.6.0
# uv for fast dependency management
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
# Python dependencies
COPY pyproject.toml uv.lock /code/
RUN UV_PROJECT_ENVIRONMENT=/usr/local uv sync --frozen
COPY . /code/

Docker Compose Services

ServicePurpose
webDjango dev server on port 9000
dbPostgreSQL database
redisRedis for Celery and caching
celeryCelery worker
celery-beatCelery Beat scheduler (redbeat)
mediaNginx for serving media files

Running in Development

# Start all services
docker compose up -d

# Start just the web server
docker compose up -d web

# View logs
docker compose logs -f web

Gunicorn

For production, use Gunicorn instead of Django's development server. SpeedPy includes gunicorn in pyproject.toml.

gunicorn project.wsgi:application --bind 0.0.0.0:8000

Release Script

The release.sh script runs during deployment to apply migrations and ensure a superuser exists:

#!/bin/bash
set -e
python manage.py migrate
python manage.py makesuperuser

This script is typically configured as a release command in your deployment platform.

Makefile Commands

The Makefile provides shortcuts for common operations:

CommandDescription
make initFirst-time project setup (build, migrate, create superuser)
make devStart development server
make mmMake migrations
make mRun migrations
make twStart Tailwind watch mode
make twbBuild Tailwind CSS
make bashOpen a bash shell in the container
make run run=<cmd>Run an arbitrary command in the container

Appliku Deployment

Appliku is the recommended deployment platform. It handles:

  • Docker-based deployments on your own servers
  • Automatic SSL certificates
  • Process management (web, worker, beat)
  • Environment variable management

The appliku.yml build image is set to python-3.13-uv-node-25.6, which provides Python 3.13, uv, and Node.js 25.6 for the build environment.

Follow Appliku's documentation to connect your repository and configure the deployment.

Production Checklist

Before deploying to production, ensure you:

  1. Set DEBUG=False
  2. Set a strong SECRET_KEY
  3. Set a unique SALT_KEY
  4. Configure ALLOWED_HOSTS
  5. Set up DATABASE_URL (PostgreSQL)
  6. Set up REDIS_URL
  7. Configure EMAIL_URL with a real email provider
  8. Set DEFAULT_FROM_EMAIL
  9. Change ADMIN_URL from the default
  10. Set reCAPTCHA keys
  11. Run collectstatic
  12. Build Tailwind CSS