https://github.com/imooc-course/docker-cloud-flask-demo
https://github.com/imooc-course/docker-cloud-flask-demo
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/imooc-course/docker-cloud-flask-demo
- Owner: imooc-course
- License: mit
- Created: 2018-02-04T05:18:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-16T17:49:19.000Z (over 2 years ago)
- Last Synced: 2024-08-13T07:09:37.820Z (8 months ago)
- Language: Python
- Size: 36.1 KB
- Stars: 33
- Watchers: 4
- Forks: 113
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - imooc-course/docker-cloud-flask-demo - (Python)
README
# Flask Skeleton -
Flask starter project... https://cloud.docker.com this is a demo
## Quick Start
### Basics
1. Activate a virtualenv
1. Install the requirements### Set Environment Variables
Update *skeleton/server/config.py*, and then run:
```sh
$ export APP_SETTINGS="skeleton.server.config.DevelopmentConfig"
```or
```sh
$ export APP_SETTINGS="skeleton.server.config.ProductionConfig"
```### Create DB
```sh
$ python manage.py create_db
$ python manage.py db init
$ python manage.py db migrate
$ python manage.py create_admin
$ python manage.py create_data
```### Run the Application
```sh
$ python manage.py runserver
```So access the application at the address [http://localhost:5000/](http://localhost:5000/)
> Want to specify a different port?
> ```sh
> $ python manage.py runserver -h 0.0.0.0 -p 8080
> ```### Testing1
```
$ tox
```## Docker
```
docker run -d -p 8080:5000 imooc-course/docker-cloud-demo:latest
```this is a pull request test
this is a pull request test2