This is the backend for the Flask React project.
-
Clone this repository
-
Install dependencies (
pipenv install --python=python3
) -
Create a .env file based on the example with proper settings for your development environment
-
Setup your PostgreSQL user, password and database and make sure it matches your .env file with CREATEDB privileges
-
Run
pipenv run database.py
pipenv run flask run
To run the React Client application, checkout the readme inside the client directory.
- Create a new project
- Under Resources click "Find more add-ons" and add the add on called "Heroku Postgres"
- Install the Heroku CLI
- Run
$ heroku login
- Login to the heroku container registry
$ heroku container:login
- Update the
REACT_APP_BASE_URL
variable in the Dockerfile. This should be the full URL of your react app: i.e. "https://flask-react-aa.herokuapp.com" - Push your docker container to heroku (this will build the dockerfile, and push)
$ heroku container:push web -a {NAME_OF_HEROKU_APP}
- Release your docker container to heroku
$ heroku container:release web -a {NAME_OF_HEROKU_APP}
- set up your database:
$ heroku run python -m database
- profit