Skip to content

Leo-rq-yu/WeatherForecast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

WeatherForecast

Initialization command:

Build image in local $docker image build -t flask_docker .
Run the image $docker run -p 5000:5000 -d flask_docker
Check the Dockerfile to start the app.
Use Docker Desktop to overview and manage all containers and images.

Local test:

run Python file to test $FLASK_APP=app flask run
Edit requirements.txt to add more dependencies.

Deployment(to Hub):

First, create a repo in Docker Hub
Then in the local terminal, run: docker login -u YOUR-USER-NAME to login
Next, tag the local image to rename: docker tag local-name YOUR-USER-NAME/new-name
Finally, push: docker push YOUR-USER-NAME/new-name

https://docs.docker.com/get-started/04_sharing_app/

Deployment (host web app):

Add gunicorn into the requirements.txt, then create a new empty repo and push files to it.
Set the repo as remote, and then use DigitalOcean to access the repo and then build and deploy.
https://docs.digitalocean.com/tutorials/app-deploy-flask-app/

Remote repo: https://github.com/Leo-rq-yu/weather-forecast.git

Website: https://stingray-app-i8a35.ondigitalocean.app/weather-forecast2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published