tuanhcmute / Nhom1_CCPTPM

3 stars 0 forks source link

Final Project: API Dashboard

My Skills\

GitHub labels GitHub repo size GitHub milestones GitHub milestone GitHub repo file count

Table of Contents

  1. Members
  2. Overview
  3. How to run this project\ 3.1. Manual\ 3.2. Using docker
  4. Deploy AWS
  5. Run test case
  6. Contact

Members :relaxed::

Overview

  1. Technology
  1. Structure project
└── Nhom1_CCPTPM/
   ├── .circleci/
   │   └── config.yml
   ├── .github/
   │   └── FUNDING.yml
   ├── app/
   │   ├── authen/
   │   │   ├── __init__.py
   │   │   └── routes.py
   │   ├── main/
   │   │   ├── __init__.py
   │   │   └── routes.py
   │   ├── model/
   │   │   └── user.py
   │   ├── static/
   │   │   ├── css
   │   │   ├── fonts
   │   │   ├── image
   │   │   ├── js
   │   │   └── vendor
   │   ├── templates/
   │   │   ├── base.html
   │   │   ├── data.html
   │   │   ├── index.html
   │   │   ├── login.html
   │   │   └── partials/
   │   │       ├── footer.html
   │   │       ├── header.html
   │   │       └── sidebar-nav.html
   │   ├── utils/
   │   │   └── contants.py
   │   ├── vendor/
   │   │   ├── getToken.py
   │   │   └── getData.py
   │   ├── __init__.py
   │   ├── app
   │   ├── config.py
   │   └── extensions.py
   ├── test/
   │   ├── __init__.py
   │   ├── conftest.py
   │   ├── auth/
   │   │   └── test_login.py
   │   └── main/
   │       └── test_main.py
   ├── .env
   ├── .gitignore
   ├── README.md
   └── requirements.txt

How to run this project

Manual

  1. Install python 3.9 (If you don't have)
  1. Clone project

    git clone https://github.com/tuanhcmute/Nhom1_CCPTPM
  2. Run commands:\

Notice: Please run commands in git bash or other terminal support Linux environment\

3.1. Create virtual env

virtualenv ./venv

3.2. Active virtualenv

source ./venv/Scripts/activate

3.3. Install packakge from pip

pip install -r requirements.txt

3.4. Load all config from .env file

source .env

3.5. Download postgresQL and config username password in postgresQL

3.6. Open .env file in this project and change DATABASE_URI=postgresql://<your_usernamw>:<your_password>@<your_host>:<your_port>/<your_database>"

3.7. Run project with command flask run. Sever running on http://localhost:50000

3.8. Enter username = admin , password = admin to login account

Setup project with docker

  1. Clone project
    git clone https://github.com/tuanhcmute/Nhom1_CCPTPM
  2. Run docker-compose file
    docker-compose -f ./docker-compose.yml up -d --build
  3. If remove container
    docker-compose -f docker-compose.yml down -v
  4. Enter username = admin , password = admin to login account

Deployment

Hướng dẫn deploy project lên AWS

Run test case

  1. Windows
pytest
  1. Linux
python -m pytest

3.10. Create requirements.txt

pip freeze > requirements.txt

Contact us

If you have any question, please contact us through email:

20110743@student.hcmute.edu.vn

or

20110202@student.hcmute.edu.vn

Thanks for watching :relaxed::relaxed::relaxed::relaxed: