Fyyur is the first project for the 2019 Udacity Full-stack Developer Nanodegree. The project is associated to the SQL and Data Modeling for the Web course. The starter code and project instructions can be found here.
Note: A 2-minute video showing all the steps below is available here.
- Clone the repository and cd into the project directory:
git clone https://github.com/wanderindev/fyyur.git
cd fyyur
-
Deploy a Postgresql instance and create a database named
fyyur
. There are two options for this step:a. Use a local or remote Postgresql server and create the database there. In this case, just open
config.py
and modifySQLALCHEMY_DATABASE_URI
to point to the correct database.b. The other option is to run the included
Dockerfile
anddocker-compose.yml
to create a Postgresql container with the database already set up. You would need to have docker and docker-compose already installed and configured, and follow these steps:- CD into the postgresql directory:
cd postgresql
- Run the following command:
docker-compose up --build
-
Open a new terminal windows, letting the container run in the original terminal windows. In the new terminal window, cd into the project root:
cd fyyur
- Create and activate a virtual environment:
python3 -m venv venv
. venv/bin/activate
- Install the project requirements:
pip install -r requirements.txt
- Upgrade the database:
flask db upgrade
- Run the application:
export FLASK_APP=run
flask run
Configuration values are located in config.py
. If using a database other
than the instance running in Docker, the connection string can be modified there.
Upon the first request, the application will populate the database with fake
data. This feature can be turn off changing the value for POPULATE_DB
in config.py
to False
.
Effective Python by Brett Slatkin
Flask Web Development by Miguel Grinberg
Essential SQLAlchemy by Jason Myers and Rick Copeland
👤 Javier Feliu
- Twitter: @JavierFeliuA
- Github: @wanderindev
Starter code provided by Udacity.
Give a ⭐️ if this project helped you!
Copyright © 2019 Javier Feliu.
This project is MIT licensed.
I based this README on a template generated with ❤️ by readme-md-generator