flask-compose | Docker-Compose based Flask hello world application | Continuous Deployment library
kandi X-RAY | flask-compose Summary
kandi X-RAY | flask-compose Summary
Docker-Compose based Flask hello world application
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Send hello message .
flask-compose Key Features
flask-compose Examples and Code Snippets
Community Discussions
Trending Discussions on flask-compose
QUESTION
I'm trying to access the flask webpage on my host machine. I've tried two different methods to make this work. However, for both methods I get can’t establish a connection to the server at localhost:5000
. I've tried accessing from 0.0.0.0:5000
, localhost:5000
, and 127.0.0.1
but none work.
Running directly from the
web
directory.docker build --tag my-python-app . docker run --name python-app -p 5000:5000 my-python-app
Running
docker-compose
from theflask-compose-sample
directory.docker-compose up --build
Directory structure:
...ANSWER
Answered 2019-Nov-06 at 16:55Simple answer. I didn't find this answer on the many other posts I searched on either so hopefully it helps someone else.
If you're using Docker Quickstart Terminal like I am, it doesn't use the localhost IP. Instead it has it's own IP of 192.168.99.100
. Using that instead of localhost
makes everything work.
QUESTION
I followed http://containertutorials.com/docker-compose/flask-compose.html and have a running container.
...ANSWER
Answered 2017-Apr-18 at 20:23There are two problems first the tutorial you are referring to has syntax error in the first line of app.py it should be
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install flask-compose
You can use flask-compose like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page