Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 2.41 KB

README.md

File metadata and controls

69 lines (48 loc) · 2.41 KB

Project description

A Flask application serving a React powered marketing dashboard.

  • This project contains the necessary files for a deployment to a Google App Engine instance.
  • The source code of the React app is available here.

This dashboard template is adapted from the the Gentelella bootstrap admin template by colorlib.

Live Demo

Click here to see the dashboard in action.

Installation

1. (Optional) Set up a virtual environment

Python official doc on virtual environments

2. Get the code

$git clone https://github.com/aminbouraiss/flask-dashboard.git
$cd flask-dashboard

3. Install the project dependencies

$pip install -r requirements.txt

4. Running the local server

Launch the dev server with the following commands:

$export FLASK_APP=flask_app.py
$export FLASK_DEBUG=1
$flask run

The local server will be available at: Local: http://localhost:3000/ On Your Network: http://192.168.0.5:3000/

Deployment to Google App engine

The full documentation is available here.

  1. Create a new GCP project and App Engine application using the GCP Console
  2. When prompted, select the region where you want your App Engine application located. After your App Engine application is created, the Dashboard opens.
  3. Download and install the Google Cloud SDK and then initialize the gcloud tool.
  4. go to the directory that contains project code.
  5. Install the project requirements with the following command:
    $pip install -t lib -r requirements.txt
  6. Test the application using the local development server (dev_appserver.py), which is included with the SDK. start the local development server with the following command:
    $dev_appserver.py app.yaml
  7. Visit http://localhost:8080/ in your web browser to view the app.
  8. You can deploy the final version of the app with the following command:
    $gcloud app deploy