Skip to content

mongodb-developer/azurecontainerappdemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask with MongoDB Project

Building for Docker

At the root of the project, execute the following from the command line to build a Docker image from the project.

docker build -t anaiyaflask:arm .  

In the above example an optional tag is used. If you're using an M1 Mac, it makes sense to tag it as arm to represent compatibility.

If you're using an M1 Mac or would like to build for a different platform or CPU architecture, execute the following:

docker buildx build --platform linux/amd64 -t anaiyaflask:amd64 .

In the above example buildx is used to build an image for AMD64 with an appropriate tag.

Deploying with Docker

To deploy the application with Docker, execute the following command from the command line:

docker run -d -p 5000:5000 -e "CONNECTION_STRING=<MONGODB_ATLAS_URI_STRING_HERE>" anaiyaflask:arm

Remember to replace the MongoDB connection string with your own as well as use the appropriate tag for your CPU architecture.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published