1.3 KiB
1.3 KiB
VBV Lernwelt
Project setup is based on cookiecutter-django project template.
Deployment to CapRover
# run deploy script
./caprover_deploy.sh
Installation
See .tool-versions file for used django and node version
Create a new PostgreSQL database and role
createdb vbv_lernwelt
createuser vbv_lernwelt
Set the environment variable accordingly
export VBV_DATABASE_URL='postgres://vbv_lernwelt@localhost:5432/vbv_lernwelt'
Set VBV_DJANGO_READ_DOT_ENV_FILE=True to make the config read the example.env file (with direnv!?).
Apply migrations and run async server
python manage.py migrate
# sync server
python manage.py runserver
# or async server
uvicorn config.asgi:application --host 0.0.0.0 --reload
SASS Live-Reloading
# start django server...
# live reloading is hardcoded via proxy to port 8000 -> django server must get started manually
npm run dev
# open site with http://localhost:3000
IntelliJ Configuration
- In the .idea/vbv_lernwelt.iml file change the module type to "PYTHON_MODULE".
- Add django facet in "Project Structure".
- Run configuration with "Python -> server.py" to have async debugging support.
Optional
- Install the EnvFile Plugin
- Install the tailwind css Plugin from Jetbrains