Jasmine Zhu Athena Luo Esther Feng Zeba Shafi Harrison
Our app Budget Buddy, empowers users to plan and track spending on mobile quickly and clearly by showing planned vs. actual amounts per category, so they can make smarter day-to-day money decisions.
install and run docker desktop create a dockerhub account
First, make sure you have Python and pipenv installed.
Run in your terminal:
pip install pipenv
Second, create and activate a virtual environment for this project:
pipenv shell
Your terminal should now show a prefix like (2-web-app-bytesized) — this means you’re inside the environment.
Third, install all the project dependencies from the requirements file:
pipenv install -r requirements.txt
To verify everything installed correctly, you can check:
pip freeze
First, copy the example environment file to create your own local configuration:
cp env.example .env
Second, open .env and edit it to include your database name and MongoDB URI. For example:
MONGO_DBNAME=example MONGO_URI="mongodb://admin:secret@mongodb:27017/?authSource=admin" FLASK_APP=app.py FLASK_ENV=development FLASK_PORT=5000
⚠️ The.envfile must not be pushed to GitHub, as it contains private credentials.
Only commitenv.examplewith dummy values. if you use a database, you should change the URI to
The easiest way to launch both the Flask web server and MongoDB is through Docker Compose.
First, build and start the containers:
docker compose up --build
If you encounter a “port already in use” error, stop any previous containers first:
docker compose down , then change the ports number in the docker-compose.yml
then rerun the previous command.
Once it builds successfully, open a web browser and go to:
http://localhost:5002
You should see the running Flask web app connected to MongoDB.
To shut down the containers:
docker compose down
If you also want to remove MongoDB data volumes (for a clean reset):
docker compose down --volumes