Skip to content

Add a simone dev service to docker-compose - #119

Merged
ross merged 1 commit into
mainfrom
dev-docker-compose
Aug 10, 2026
Merged

ross merged 1 commit into
mainfrom
dev-docker-compose

Conversation

@ross

@ross ross commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a simone service to docker-compose.yml alongside the existing db service, so docker compose up brings up a full local dev stack: Django runserver with live reload (source bind-mounted) wired to a MariaDB instance.
  • Bumps the db image from mariadb:10.1 to mariadb:12-noble to match production's compose setup and reduce drift. This also happens to sidestep a bug in mysql-connector-python>=9.6.0 (currently pinned at 9.7.0) where Django's mysql sql_mode check crashes on a broken @cached_property/@staticmethod stack in DatabaseWrapper.display_name — MariaDB 12's strict-by-default sql_mode never exercises that code path.
  • Adds MYSQL_DATABASE/MYSQL_USER/MYSQL_PASSWORD so the simone db/user get created on first boot, and a healthcheck using the image's built-in healthcheck.sh --connect so the simone service doesn't race the DB's first-boot restart cycle.
  • New simone service builds from the existing Dockerfile, bind-mounts the repo (:z for SELinux) for live reload, runs migrate then runserver, and sets the env vars needed to boot in dev (dev-only DJANGO_SECRET_KEY, SIMONE_DB_* pointed at db, DJANGO_ALLOWED_HOSTS for localhost, plus the blank API-key vars already mocked by .git_hooks_pre-commit).
  • Drops the obsolete version: key (Compose warns it's ignored).

Testing

Verified a full cold-start cycle locally: docker compose up -d --build from an empty volume brings db healthy, simone runs migrate cleanly and serves /adm/login/ (200), and editing a source file on the host triggers runserver's autoreloader inside the container.

Adds a `simone` service alongside `db` so `docker compose up` brings
up a full local dev stack: Django runserver with live reload (source
bind-mounted) wired to a MariaDB instance.

- Bump db image from mariadb:10.1 to mariadb:12-noble to match
  production's docker-compose and reduce drift. This also happens to
  sidestep a bug in mysql-connector-python>=9.6.0 where Django's
  mysql sql_mode check crashes on a broken
  @cached_property/@staticmethod stack in DatabaseWrapper.display_name
  -- MariaDB 12's strict-by-default sql_mode never exercises that code
  path.
- Create the simone db/user on first boot via MYSQL_DATABASE/
  MYSQL_USER/MYSQL_PASSWORD.
- Add a healthcheck using the image's healthcheck.sh --connect so the
  simone service doesn't race the DB's first-boot restart cycle.
- New simone service: builds from the existing Dockerfile, bind-mounts
  the repo for live reload, runs migrate then runserver, and sets the
  env vars needed to boot in dev (dev-only DJANGO_SECRET_KEY,
  SIMONE_DB_* pointed at db, DJANGO_ALLOWED_HOSTS for localhost, plus
  the blank API-key vars already mocked by .git_hooks_pre-commit).
- Drop the obsolete `version:` key.
@ross
ross merged commit e66e40d into main Aug 10, 2026
1 check passed
@ross
ross deleted the dev-docker-compose branch August 10, 2026 17:41
@ross
ross restored the dev-docker-compose branch August 10, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant