Hot answers tagged

3

Unless you are using the AWS API Gateway, you'll still need some way of "serving" your Flask API. You will also need to provision an EC2 instance and run something to serve your API. Instead of running a windows EC2 instance with IIS you can save about 50% operating cost and use Nginx on a linux EC2 instance. Additionally, Nginx can be used as a reverse ...


2

Yes, it's absolutely reasonable and this is how real apps work. This is the microservice approach which allows to independently scale instances of a service and a DB. What you have to do is to run your Flask and Redis services in a way so the first one can achieve the second one. If they are on the same machine, you just have to open Redis port used by your ...


1

You can run your flask container using the host networking mode. This way docker won't isolate the container and will run it the same network namespace as the host, and you container will be able to discover your database using localhost as mongodb hostname docker run --network host <flask-image>


1

While this is possible it is not a best practice. Whenever possible, containers should contain a single process. The reasoning for this is: It fosters a modular design where you can more easily plug and play components. What if you decide not to use nginx and use asp.net core in the future? If everything is tightly coupled in one container then the ...


1

This question seems to be in two parts: How to deploy a flask+database app in Docker? Is there a non-trivial application to use as example? The second part is difficult to answer, it will depend on what you consider a good example. However, an example app with the features that you want can be deployed in several ways, and will work the same if it is in ...


Only top voted, non community-wiki answers of a minimum length are eligible