-
Notifications
You must be signed in to change notification settings - Fork 2
Local Development with Docker
paigewilliams edited this page Dec 18, 2025
·
2 revisions
- Install Docker Desktop (mac, [linux] (https://docs.docker.com/desktop/setup/install/linux/))
- Create a
local_settings.pyfromlocal_settings.py.templatein/TEKDB -
Optional: Set up and activate your preferred python virtual environment (ex: venv, pyenv, uv). This is helpful to run
ruffcommands.
- Navigate to the docker directory:
cd docker/ - Start the postgres and django containers:
docker compose up --buildOptional: add-dto run detached. Logs then are visible in the Docker Desktop app. - The django dev server is spun up at port
8000, allowing for reloads during development. - To stop the server:
docker compose down
- Navigate to the docker directory:
cd docker/ - Start the postgres and django containers in production mode:
docker compose -f docker-compose.prod.yaml up -d --build. - A uwsgi server is spun up at port
8000
- Exec into the container to run tests:
exec -it <web-server-name> python manage.py test
- From your python virtual environment,
cd TEKDB/and install dependenciespip install -r requirements.txt - Run
ruff format