Skip to content

Commit

Permalink
simpler MONGO_URI
Browse files Browse the repository at this point in the history
  • Loading branch information
bloombar committed Feb 28, 2024
1 parent eac37ef commit 288aee4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Start up a MongoDB database:

Start up the app:

- run command, `docker run -ti --rm -d -p 5000:5000 -e MONGO_DBNAME=flask-mongodb-web-app-example -e MONGO_URI="mongodb://admin:[email protected]:27017/example?authSource=admin&retryWrites=true&w=majority" bloombar/flask-mongodb-web-app-example`
- run command, `docker run -ti --rm -d -p 5000:5000 -e MONGO_DBNAME=flask-mongodb-web-app-example -e MONGO_URI="mongodb://admin:[email protected]:27017" bloombar/flask-mongodb-web-app-example`
- if you see an error about the port number being already in use, change the first `5000` in the command to a different port number, e.g. `-p 10000:5000` to use your computer's port `10000`.

View the app in your browser:
Expand Down
2 changes: 1 addition & 1 deletion env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MONGO_DBNAME=your_db_name
MONGO_URI="mongodb://your_db_username:your_db_password@your_db_host_server_name:27017/your_db_name?authSource=admin&retryWrites=true&w=majority"
MONGO_URI="mongodb://your_db_username:your_db_password@your_db_host_server_name:27017"
FLASK_APP=app.py
FLASK_ENV=development
FLASK_PORT=5000
Expand Down

0 comments on commit 288aee4

Please sign in to comment.