Giter VIP home page Giter VIP logo

autobase_web's Introduction

autobase_web

Website to control twitter_autobase database and trigger data updates.

TODO (Developer)

  • Add tests
  • Update default_config (follow twitter_autobase)
  • Complete form design using default_config
  • Integrate with twitter_autobase
    • bridge between database and Autobase object
    • save twitter_autobase ngrok url to database
    • send trigger with requests.post to twitter_autobase ngrok url
    • Re-code twitter_autobase starter (follow main.py)

Requirements

  • Python 3.8.x
  • git, heroku, and pip
  • Heroku Account (optional)

Installation & Configuration

Clone this repo

git clone https://github.com/fakhrirofi/autobase_web.git
# or download from release page
cd autobase_web

Create virtual environment & install python package

Note: Delete gunicorn and psycopg2 from requirements.txt if you are using windows.

python3 -m venv venv
source venv/bin/activate # linux
# venv\Scripts\Activate # windows
pip3 install -r requirements.txt

Make .env file

Rename .env.example to .env, then edit its contents.
Or (if using Heroku) add .env config vars on heroku app settings.

Initialize the database

flask db init
flask db migrate -m initial
flask db upgrade

Run the website locally

python3 start_gevent.py

Open 127.0.0.1:8000 on your web browser
for debugging: (set the FLASK_DEBUG to 1 in .flaskenv file)

flask run

Deploy to Heroku

Delete gevent==21.1.2 and add gunicorn==20.1.0 & psycopg2==2.8.6 in requirements.txt
Set heroku app configuration

heroku git:remote -a your-autobase-web-app-name
heroku addons:add heroku-postgresql:hobby-dev

Attach autobase_web database to twitter_autobase database

heroku addons
heroku addons:attach your-db-addon-name -a your-twitter-autobase-app-name

Deploy the application

git add .
git commit -m 'initial commit'
git push heroku main

Heroku (free-tier) limitations

  • 550 dyno hours, you can upgrade to 1000 dyno hours by adding credit card (it's free for free-tier)
  • 4 hours downtime for Postgres per month

Reference

autobase_web's People

Contributors

fakhrirofi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.