Getting started¶
This runs the engine from a clone, on SQLite, with a demo site loaded. It is the fastest way to see what an instance looks like before you deploy one.
Requires mise. The dev server uses SQLite (db.sqlite3).
mise install # Python, Poetry
mise run dj setup_local # migrate, ttrpg demo, admin/admin login
mise run i18n:compile # Polish UI strings (.mo files are not committed)
mise run start # http://localhost:8000
Day to day:
mise run check # format + lint
mise run test:py # all tests
mise run fullcheck # the commit gate
mise run site:dev # this manual, live at http://localhost:8001
mise tasks # everything else
Personal overrides go in mise.local.toml, which is gitignored.
What you get¶
setup_local migrates the database, imports the ttrpg demo and creates the
admin user with password admin. It refuses to run unless DEBUG is on, and
env/development.env turns it on.
- http://localhost:8000/ is the public site: a door per content type on the home page, a list per type, detail pages, about, search and feeds.
- http://localhost:8000/admin/ is the admin. The sidebar lists one section per content type.
To start from the other demo, a developer's portfolio of repos and talks:
mise run dj setup_local --demo dev
To start from nothing instead, skip setup_local and follow
Content:
mise run dj migrate
mise run dj createsuperuser
mise run start
PostgreSQL¶
Production runs on PostgreSQL. To develop against it, mise run db starts a
container on 127.0.0.1:5432; point the dev server at it in mise.local.toml:
[env]
DATABASE_URL = "postgres://lapidarium:lapidarium@127.0.0.1:5432/lapidarium"