g4c3 / TodoApp

Python + Flask + MongoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MongoDB: 
    docker run --name local-mongo -d mongo:latest
    
commands:
    setupVenv.ps1

run:
    # this step is not required if setupVenv.ps1 was runned already
    pip install requirements.txt

    flask run    


for use the application in docker:
    MongoDB Setup: 
        docker run --name local-mongo -p 27017:27017 mongo:latest
        docker ps
        # copy the mongo container id
        docker inspect $docker_container_id
        # find section NetworkSettings => Networks => bridge => IPAddress
        # copy the value of IPAddress
        # paste it in connection from models.py
        # if the port is not 27017, change it also

    TodoApp Setup:
        # open powershell
        # cd to the app main directory
        docker build --tag todo_app .
        docker run --publish 8000:5000 --name=todo_app todo_app

About

Python + Flask + MongoDB


Languages

Language:Python 89.5%Language:PowerShell 5.8%Language:Dockerfile 4.6%