Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taurus5650/flask_docker_ngrok_practice
https://github.com/taurus5650/flask_docker_ngrok_practice
docker docker-compose docker-container docker-image dockerfile flask ngrok ngrok-server python3
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/taurus5650/flask_docker_ngrok_practice
- Owner: taurus5650
- Created: 2024-08-21T12:44:51.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-12-09T08:53:28.000Z (about 1 month ago)
- Last Synced: 2024-12-09T09:39:29.694Z (about 1 month ago)
- Topics: docker, docker-compose, docker-container, docker-image, dockerfile, flask, ngrok, ngrok-server, python3
- Language: Dockerfile
- Homepage:
- Size: 229 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flask + Docker + Ngrok Practice
## Purpose
Build a simple webhook / website, practice how to use ...
1. Poetry
2. Flask
3. Docker
4. Ngrok## Operation
### Poetry env setup
- When the project start from 0 to 1
```commandline
$ poetry init # Enter No, No, Yes
$ pyenv shell 3.11.9 # If have use pyenv
$ python3 -m venv .venv
$ poetry env use /PATH/flask_docker_ngrok_practice/venv/bin/python3
$ poetry shell
$ poetry add xxx # Package name e.g. poetry add flask
$ poetry lock # Lock file sync with toml
$ poetry export --without-hashes --without-urls | awk '{ print $1 }' FS=';' > requirements.txt # Optional if need export requirements.txt
```- When clone the repo from others
```commandline
$ poetry install
$ poetry shell
```### Coding
Coding ... ...### Provide Ngrok Token
Input token to ngrok.yml.
The token get from https://dashboard.ngrok.com/get-started/your-authtoken
![ngrok_token.png](readme%2Fngrok_token.png)### After all done then build up the webhook / website
```commandline
$ docker-compose build
$ docker-compose up
```
![url.png](readme%2Furl.png)### Happy Testing
https://fa96-118-167-218-47.ngrok-free.app
![img.png](readme%2Fimg.png)