Best Flask open-source libraries and packages

Flask_with_gunicorn_in_docker_for_upbit

고정 IP를 통한 upbit 요청 우회를 위한 flask-gunicorn을 docker로 말아서 구현 (github actions, lambda 호출용)
Updated 1 month ago

UPBIT Flask

# IP 확인
$ curl ifconfig.me
# 세팅
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install --upgrade pip
# pip install pyupbit flask gunicorn gevent -q
# pip freeze > requirements.txt
$ pip install -r requirements.txt
# flask run 
# gunicorn app:app -b 0.0.0.0:8000 -w 2 --timeout 10
# mkdir logs
# gunicorn app:app -b 0.0.0.0:8000 -w 2 -k gevent --timeout 10 --error-logfile logs/gunicorn.error.log --access-logfile logs/gunicorn.log --capture-output
$ gunicorn app:app --reload
# Docker
$ docker build -t upbit-flask .
$ docker run --name upbit-flask -d -p 80:80 -v ./logs:/usr/src/app/logs upbit-flask

Reference

Upbit

Docker

Flask & Gunicorn

Tags lambda