2026-03-10 19:23:56 +11:00
2026-03-10 19:23:56 +11:00
2024-12-31 00:08:08 +11:00
2024-12-31 00:08:08 +11:00
2024-12-24 00:57:08 +11:00
2026-03-10 19:23:56 +11:00
2024-12-24 01:00:30 +11:00
2024-12-31 00:08:08 +11:00
2026-03-10 19:23:56 +11:00
2026-03-10 19:23:56 +11:00

Dev-machine setup

  • Create the virtual environment python -m venv venv

  • Activate the virtual environment On Linux/Mac source venv/bin/activate On Windows venv\Scripts\activate

  • Install Python dependencies pip install -r requirements.txt

  • Install tailwind npm install

Run locally

  • Start live tailwind compiler npm run serve
  • Start bloodpressure application flask run

Docker

Docker build

docker build -t bloodpressure .

Run locally

docker run -p 5000:5000 -e DATABASE_URL=postgres://postgres:59fff56880e1bbb42e753d2a82ac21b6@peterstockings.com:15389/bloodpressure_db bloodpressure

Model updates

Create migration

flask db migrate -m "Add timezone to Profile model"

Apply migration

flask db upgrade

Fix deployment issues

Because I was originally using a Heroku buildpack to build/host this app prior to switching to a Dockerfile it sets the ports to:

root@dokku-aus:~# dokku ports:report bloodpressure
=====> bloodpressure ports information
       Ports map:
       Ports map detected:            https:5000:5000

To resolve this simply clear the ports after each deployment

dokku ports:clear bloodpressure
Description
No description provided
Readme 507 KiB
Languages
HTML 64%
Python 32.5%
JavaScript 2.1%
Dockerfile 1.1%
Mako 0.3%