https://github.com/mongodb-developer/azurecontainerappdemo
https://github.com/mongodb-developer/azurecontainerappdemo
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mongodb-developer/azurecontainerappdemo
- Owner: mongodb-developer
- Created: 2023-04-11T19:51:58.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-04-11T19:52:21.000Z (about 2 years ago)
- Last Synced: 2025-02-16T02:44:08.908Z (4 months ago)
- Language: Python
- Size: 7.26 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
```bash
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:
```bash
docker buildx build --platform linux/amd64 -t anaiyaflask:amd64 .
```In the above example [buildx](https://github.com/docker/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:
```bash
docker run -d -p 5000:5000 -e "CONNECTION_STRING=" anaiyaflask:arm
```Remember to replace the MongoDB connection string with your own as well as use the appropriate tag for your CPU architecture.