Ok, lets get started. You're gonna need the usual things to get started:
- Docker
- Python 3.12
- uv (for Python dependency management)
- PostgreSQL
- S3 Buckets (Provider of choice, we use Backblaze for production and S3Proxy1 for dev)
- Domain with SSL certificate
make(seriously, you should have this)
- PyCharm (not required but recommended)
If you are on x86 then you might need to edit the docker-compose.yml.
Remove the platform: linux/arm64 from the s3proxy service.
I got you, Bae. But you really need to get the OpenAI API key. When you have that come back.
Just run the following command:
make bootstrap-devIt will :
- pull containers
- build the django container
- install Python dependencies with uv
- migrate the initial database
- prompt you to create a superuser.
If you want to see all the things that does just peek at the Makefile.
NOTE: This does not start the crawlers. We will take that in the next step.
Now we are ready to rock. Let's spin up the full dev environment.
make dev-startNote, the workers will also start, but they do nothing. You will need to activate them in the admin (See below).
When that is done point your browser to http://localhost:8000/admin, and you should see the application running. Login as the superuser.
-
Site Name: Set up the name and domain in the admin.
-
Global Site config Go to the "other" site configuration (yeah, yeah, I know) and check the following:
Worker Enabled- This will enable the workers to run. Globally.Worker sleep seconds- This is the time in seconds that the workers will sleep between runs. 3JS Head: Javascript to run in the head of every page. This will be where you will put analytics, for example. 4JS Body: Javascript to run in the body of every page. This is the last tag in the body.
-
Worker configs: Manage the finer-grained settings for workers:
Is enabled: Enable the worker.Sleep seconds: The time in seconds that the worker will sleep between runs.Log Level: The log level for the worker. (This is important for debugging in production)
I currently use Dokku2 for deployment. It is a Heroku-like PaaS that you can run on your own servers. It is easy to use and has a lot of plugins.
Another option is Docker compose. You can use the docker-compose.yml file to
run the application locally or on a server.
- Dokku (it should also work with Heroku)
- Docker Compose
- PostgreSQL
- Domain with SSL certificate