The Official Website for Dotman Comics
I'm using Dev Containers so that everything starts up nice and proper. Just need VS Code and the Dev Containers extension.
Right now we need to do a few manual steps.
uv run manage.py migrate
uv run manage.py collectstaticThese commands will prepare the database and publish the static assets in the RustFS container.
uv run manage.py migrate
uv run manage.py runserver
Note: you only need to run the
migrateonce, but it never hurts to run again (it'll detect no new migrations, and do nothing).
-
To create an superuser account, use this command:
$ uv run manage.py createsuperuser
$ uv run pytest
Note:
pyproject.tomlhas configurations forpytestto work.
This project uses ruff to lint code. We can run it with the following:
uv run ruff check --diff .
I'm keeping this section in case of Dev Container catastrophy
This describes how I'll need to set up my dev environment in a mac (what I currently use ).
You'll need the following:
Next run the following:
$ brew install uv
Astral's uv manages Python projects, dependencies and virtual environments.
Create an .env file in the root of the project folder. It should contain the following items:
DJANGO_READ_DOT_ENV_FILE=True
POSTGRES_PASSWORD=django_pass
POSTGRES_USER=django_user
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
DJANGO_ADMIN_URL=admin
DJANGO_SETTINGS_MODULE=config.settings.local
DJANGO_SECRET_KEY=UseAGeneratedValueOrDontAsItsLocal
DJANGO_ALLOWED_HOSTS=.dotman.ca
DJANGO_SECURE_SSL_REDIRECT=False
DJANGO_ACCOUNT_ALLOW_REGISTRATION=True
USE_S3=True
AWS_S3_ENDPOINT_URL=http://localhost:9000
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
AWS_STORAGE_BUCKET_NAME=dotmanca
AWS_S3_REGION_NAME=
DOTMAN_STATIC_AND_MEDIA_BASE_URL=http://localhost:9000
STATIC_LOCATION=static
PUBLIC_MEDIA_LOCATION=media
You can review those settings, or accept as-is since this is for local. Do not use the above for production or UA environments.
Next, we can bring up the junk database to use:
$ docker compose up postgres -d
And we'll also want a junk S3 server to use:
$ docker compose up s3 -d
These commands only bring up a database and and S3 compatible server.
Note: you will need to create the busket in Minio (the S3 compatible server) manually.