The Fitness Tracker API project is designed to track exercises, nutrition, and workouts, utilizing a Python backend with Django and Postgres for the database.
- Make sure Postgres is installed locally. Checkout installation here Postgres
- Clone the project.
git clone https://github.com/CyrilBaah/fitnesstracker.git cd fitnesstracker- Create a virtual environment and activate it
virtualenv env
source env/bin/activate - Install packages
pip install -r requirements.txt - Change the env.example file to .env and update it accordingly
- Run migrations
python manage.py migrate- Start server
python manage.py runserver- Access the fitnesstracker API
- Make sure Docker is installed locally. Checkout installation here Docker
- Make sure Postgres is installed locally. Checkout installation here Postgres
- Clone the project.
git clone https://github.com/CyrilBaah/fitnesstracker.git cd fitnesstracker- Change the env.example file to .env
- Run
docker-compose build --no-cache- Run
docker-compose up cd scripts ./run-linters.sh- Exercise
./manage seed_exercises- Nutritions
./manage seed_nutritions- Workout
./manage seed_workouts ./manage.py spectacular --color --file schema.ymlhttp://127.0.0.1:8000/api/schema/docs
./scripts/run-secretkey.sh - Minikube is installed. Checkout installation here Minikube
- Kind is installed. Checkout installation here Kind
$ kubectl apply -f ops/$ kubectl port-forward service/fitnesstracker 8000:8000$ minikube dashboard --url$ kubectl get service fitnesstracker -o jsonpath='{.spec.clusterIP}'$ kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}'Get ClusterIP
$ kubectl get service fitnesstrackerModify /etc/hosts
$ sudo nano /etc/hostsAdd cluster IP to /etc/hosts
123.456.7.8 fitnesstracker.comUse KinD
- Run
make create-cluster
- Install Nginx Ingress Controller
make install-nginxingresscontroller