Skip to content

Dockerize regluit for local development and testing #1119

@rdhyee

Description

@rdhyee

Why: test.unglue.it costs ~$88/month (EC2 + RDS) running 24/7. Local Docker would enable testing PRs without spinning up AWS infrastructure.

Requirements

  • Django 1.11.29 + Python 3.8
  • MySQL 8.0
  • Redis (for Celery, optional for basic testing)
  • Load production DB snapshot for realistic testing
  • Run manage.py test locally
  • Browse the site at localhost

Approach

  • Dockerfile based on Python 3.8
  • docker-compose.yml with app + MySQL + Redis services
  • Docker-specific settings file (like doab-check's settings/docker.py)
  • Script to load a production DB dump for realistic data
  • Port 8000 or configurable

Prior art

doab-check is already dockerized (~/C/src/doab-check) with the same pattern:

  • Dockerfile, docker-compose.yml, settings/docker.py
  • Full production DB loaded via pg_dump
  • Running at localhost:8001

Complexity notes

  • Django 1.11 is old but Docker doesn't care — just pin Python 3.8
  • MySQL instead of PostgreSQL (doab-check uses Postgres)
  • Celery/Redis optional — most testing doesn't need background tasks
  • settings/keys/ needs dummy values for local dev
  • Static files need collectstatic

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:opsInfrastructure and deployment work

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions