make install_local- Install Python (via uv) and JS dependencies for local tooling (linting, type checking, etc.)make- Start the dev environment (Docker, asset watching, livereload)make assets- Build frontend assets (Tailwind CSS, JS bundles)make test- Run Python and JS test suitesmake deploy- Deploy to staging server
Requirements:
For macOS
brew install bun uvSteps:
- Run
make install_localto install dependencies. - Run
maketo bring up the dev environment. You may need to create a blank.envfile in the root directory. - Run
make assetsto compile the assets.
- Run
make testto run the tests.
make deployto deploy to the staging server.make deploy-prodto deploy to the production server.
- Totem used
dokkufor deployment. TheDockerfileis used to build the image.- Configure
dokkuto use the production Dockerfile:dokku builder:set totem selected dockerfileanddokku builder-dockerfile:set totem dockerfile-path compose/production/django/Dockerfile.
- Configure
The production Postgres config is at compose/production/postgres/postgresql.conf. To apply changes:
- Find the Dokku config directory:
dokku postgres:info totemdb --config-dir - Copy the config:
scp compose/production/postgres/postgresql.conf <vps>:<config-dir>/postgresql.conf - Restart Postgres:
dokku postgres:restart totemdb
Note: shared_buffers changes require a full restart to take effect.
After a Postgres point update, refresh collation versions to suppress warnings:
docker exec -i dokku.postgres.totemdb psql -U postgres <<'EOF'
SELECT format('ALTER DATABASE %I REFRESH COLLATION VERSION', datname)
FROM pg_database WHERE datallowconn \gexec
EOFFor the local dev database:
docker exec -i totem_local_postgres psql -U debug -d totem <<'EOF'
SELECT format('ALTER DATABASE %I REFRESH COLLATION VERSION', datname)
FROM pg_database WHERE datallowconn \gexec
EOF- Download backup locally
- Take app offline:
dokku ps:stop totem scpbackup into VM home foldertar -xf backup.tgzdocker cp backup/export dokku.postgres.totemdb:/tmp/exportdocker exec -i dokku.postgres.totemdb bash
To do a full wipe and restore:
dropdb -U postgres totemdbcreatedb -U postgres -T template0 totemdbpg_restore -U postgres -d totemdb < /tmp/export- Then redeploy or
dokku ps:start totem