All the information on how to run, develop and update your new application can be found in the documentation.
- Update the name of the
.env.exampleto.envand update relevant variables.
To start you'll need to run these commands:
poetry installpoetry export -f requirements.txt --output requirements.txt --without-hashespoetry run python manage.py makemigrationsmake serve: Make sure you have a Docker Engine running. I recommend OrbStack.
- When everything is running, go to http://localhost:8000/ to check if the backend is running.
- If you get an error about manifest.json, just restart containers by doing Ctrl+C in the terminal and
make serveagain.
- If you get an error about manifest.json, just restart containers by doing Ctrl+C in the terminal and
- You can sign up via regular signup. The first user will be made admin and superuser.
- Go to http://localhost:8000/admin/ and update Site info (http://localhost:8000/admin/sites/site/1/change/) to
- localhost:8000 (if you are developing locally, and real domain when you are in prod)
- Your project name
To start using Logfire, checkout their docs: https://logfire.pydantic.dev/docs/
It will be simple:
- Register
- Create a project
- Get a write token and add it to env vars in your prod environment
- Create 4 apps on CapRover.
ask_hn_digestask_hn_digest-workersask_hn_digest-postgresask_hn_digest-redis
-
Create a new CapRover app token for:
ask_hn_digestask_hn_digest-workers
-
Add Environment Variables to those same apps from
.env. -
Create a new GitHub Actions secret with the following:
CAPROVER_SERVERCAPROVER_APP_TOKENWORKERS_APP_TOKENREGISTRY_TOKEN
-
Then just push main branch.
- Don't forget to update the site domain and name on the Admin Panel.
- If you made changes to tasks, you need to restart the worker container with
make restart-worker. - If you will need to use from
pgvectordon't forget to runCREATE EXTENSION vector;in your db, before running any migrations withVectorFields