From 4a1655dd444a9fb5d97dc49f9764899d8c6a789d Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Thu, 26 Dec 2024 00:57:56 +1100 Subject: [PATCH] Update readme to include dev machine setup and explaination on deployment issue (Recreating app) --- Readme.md | 46 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/Readme.md b/Readme.md index fb8ac49..c535b9c 100644 --- a/Readme.md +++ b/Readme.md @@ -1,12 +1,48 @@ -# Docker build +# Dev-machine setup -docker build -t bloodpressure . +- 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` -# Run locally +- Install tailwind + `npm install` -docker run -p 5000:5000 -e DATABASE_URL=postgresql://postgres:59fff56880e1bbb42e753d2a82ac21b6@peterstockings.com:15389/bloodpressure_db bloodpressure +#### 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=postgresql://postgres:59fff56880e1bbb42e753d2a82ac21b6@peterstockings.com:15389/bloodpressure_db bloodpressure` # Fix deployment issues -dokku proxy:build-config bloodpressure +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 +```