Quellcode durchsuchen

Update README.md

App Generator vor 3 Jahren
Ursprung
Commit
cf42fd4f3d
1 geänderte Dateien mit 105 neuen und 7 gelöschten Zeilen
  1. 105 7
      README.md

+ 105 - 7
README.md

@@ -10,10 +10,19 @@ Open-source **Flask Dashboard** generated by `AppSeed` op top of a modern `Boots
 
 > 🚀 Built with [App Generator](https://appseed.us/generator/), timestamp: `2022-05-25 09:44`
 
-- `Up-to-date dependencies`
-- Database: `sqlite`, `MySql` (for production)
-- `DB Tools`: SQLAlchemy ORM, Flask-Migrate (schema migrations)
-- Session-Based authentication (via **flask_login**), Forms validation
+- `Up-to-date dependencies`, active versioning
+- `DB Tools`: SQLAlchemy ORM, `Flask-Migrate` (schema migrations)
+- `Persistence`:
+  - `SQLite` for development - `DEBUG=True` in `.env`
+  - `MySql` for production - `DEBUG=False` in `.env` 
+- `Authentication`
+  - Session Based (via **flask_login**)
+  - `Social Login` (optional) for **Github**
+- `Deployment`
+  - `Docker`, HEROKU
+  - Page Compression via `Flask-Minify` (for production)
+- `Dark Mode` (enhancement)
+  - Persistent via browser `local storage`
 
 <br />
 
@@ -40,14 +49,27 @@ $ docker-compose up --build
 
 Visit `http://localhost:5085` in your browser. The app should be up & running.
 
-<br /> 
+<br />
+
+## ✨ Create a new `.env` file using sample `env.sample`
+
+The meaning of each variable can be found below: 
 
-## ✨ How to use it
+- `DEBUG`: if `True` the app runs in develoment mode
+  - For production value `False` should be used
+- `ASSETS_ROOT`: used in assets management
+  - default value: `/static/assets`
+- `OAuth` via Github
+  - `GITHUB_ID`=<GITHUB_ID_HERE>
+  - `GITHUB_SECRET`=<GITHUB_SECRET_HERE> 
+
+<br />
+
+## ✨ Manual Build
 
 > Download the code 
 
 ```bash
-$ # Get the code
 $ git clone https://github.com/app-generator/flask-black-dashboard.git
 $ cd flask-black-dashboard
 ```
@@ -79,6 +101,8 @@ $ export FLASK_ENV=development
 
 ```bash
 $ flask run
+// OR
+$ flask run --cert=adhoc # For HTTPS server
 ```
 
 At this point, the app runs at `http://127.0.0.1:5000/`. 
@@ -115,6 +139,8 @@ $ $env:FLASK_ENV = "development"
 
 ```bash
 $ flask run
+// OR
+$ flask run --cert=adhoc # For HTTPS server
 ```
 
 At this point, the app runs at `http://127.0.0.1:5000/`. 
@@ -229,6 +255,78 @@ The project is coded using blueprints, app factory pattern, dual configuration p
 
 <br />
 
+## ✨ Deploy APP with HEROKU
+
+> The set up
+
+- [Create a FREE account](https://signup.heroku.com/) on Heroku platform
+- [Install the Heroku CLI](https://devcenter.heroku.com/articles/getting-started-with-python#set-up) that match your OS: Mac, Unix or Windows
+- Open a terminal window and authenticate via `heroku login` command
+- Clone the sources and push the project for LIVE deployment
+
+<br />
+
+> 👉 **Step 1** - Download the code from the GH repository (using `GIT`) 
+
+```bash
+$ git clone https://github.com/app-generator/flask-black-dashboard.git
+$ cd flask-black-dashboard
+```
+
+<br />
+
+> 👉 **Step 2** - Connect to `HEROKU` using the console
+
+```bash
+$ # This will open a browser window - click the login button (in browser)
+$ heroku login
+```
+<br />
+
+> 👉 **Step 3** - Create the `HEROKU` project
+
+```bash
+$ heroku create
+```
+
+<br />
+
+> 👉 **Step 4** - Access the HEROKU dashboard and update the environment variables. This step is mandatory because HEROKU ignores the `.env`.
+
+- `DEBUG`=True
+- `FLASK_APP`=run.py
+- `ASSETS_ROOT`=/static/assets
+
+![AppSeed - HEROKU Set UP](https://user-images.githubusercontent.com/51070104/171815176-c1ca7681-38cc-4edf-9ecc-45f93621573d.jpg)
+
+<br />
+
+> 👉 **Step 5** - Push Sources to `HEROKU`
+
+```bash
+$ git push heroku HEAD:master
+```
+
+<br /> 
+
+> 👉 **Step 6** - Visit the app in the browser
+
+```bash
+$ heroku open
+```
+
+At this point, the APP should be up & running. 
+
+<br />
+
+> 👉 **Step 7** (Optional) - Visualize `HEROKU` logs
+
+```bash
+$ heroku logs --tail
+```
+
+<br />
+
 ## PRO Version
 
 > For more components, pages and priority on support, feel free to take a look at this amazing starter: