Menu

Deploying Cookiecutter Django on DigitalOcean (Ubuntu 24.04 (LTS) x64)
πŸ–ΌοΈ

Deploying Cookiecutter Django on DigitalOcean (Ubuntu 24.04 (LTS) x64)

DEV CommunityΒ·Vicente G. ReyesΒ·6 months ago
#BBkjRnaR
#update#devops#docker#python#exit
Reading 0:00
15s threshold

A no-fluff deployment runbook for getting a Cookiecutter Django project live on DigitalOcean using Docker and Traefik. Covers the full path from droplet provisioning to a working production deployment with SSL, plus the gotchas I keep hitting.

Pre-flight Checklist

Before touching the droplet, confirm:

Cookiecutter Django project generated locally with production = Docker , Traefik (or Nginx), Postgres , and your email backend of choice (Mailgun, SendGrid, Anymail, etc.)

Project pushed to a private GitHub repo

Domain registered with DNS access

DigitalOcean account ready

Local SSH keypair ( ~/.ssh/id_ed25519 ) ready

All .envs/.production/* files prepared locally (these are git-ignored and must be transferred separately)

Required env files:

.envs/.production/.django .envs/.production/.postgres

Enter fullscreen mode

Exit fullscreen mode

Generate strong values for DJANGO_SECRET_KEY , DJANGO_ADMIN_URL , POSTGRES_PASSWORD , etc:

python -c "import secrets; print(secrets.token_urlsafe(64))"

Enter…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.