https://github.com/yeukfei02/tropicalcycloneapi
tropicalCycloneApi
https://github.com/yeukfei02/tropicalcycloneapi
celery flask postgres python redis
Last synced: about 1 year ago
JSON representation
tropicalCycloneApi
- Host: GitHub
- URL: https://github.com/yeukfei02/tropicalcycloneapi
- Owner: yeukfei02
- License: mit
- Created: 2020-09-05T14:48:43.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-23T14:59:08.000Z (over 4 years ago)
- Last Synced: 2024-05-09T16:14:00.384Z (about 2 years ago)
- Topics: celery, flask, postgres, python, redis
- Language: Python
- Homepage:
- Size: 90.8 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tropicalCycloneApi
tropicalCycloneApi
documentation:
## Requirement
- install python(3.8)
- install pip3
- install celery
- install postgres
- install redis
## Testing and run
```zsh
// use requirements.txt
$ pip3 install -r requirements.txt
// run api
$ python3 app.py
or
$ flask run
or
$ gunicorn app:app --reload
// create db migration
$ python3 manage.py db init
$ python3 manage.py db migrate
$ python3 manage.py db upgrade
// run cron job
$ celery worker -A app.celery --loglevel=info --purge
$ celery beat -A app.celery --loglevel=info
// check schedule job in flower dashboard
$ flower -A app.celery --port=5555
open localhost:5555
// run test case
$ python3 src/test/main.test.py
```
## Docker
```zsh
// build images and start container in one line
docker-compose up -d --build
// go inside container
docker exec -it /bin/bash
// check container logs
docker logs
// remove and stop container
docker-compose down
```
open localhost:5000