{"id":24320085,"url":"https://github.com/a7medayman6/todo-list-dockerized-flask-webapp","last_synced_at":"2025-09-27T04:31:38.806Z","repository":{"id":84944509,"uuid":"364489653","full_name":"a7medayman6/Todo-List-Dockerized-Flask-WebApp","owner":"a7medayman6","description":"Simple web-app to practice docker, CI, and deployment concepts using flask and python.","archived":false,"fork":false,"pushed_at":"2021-09-30T17:59:45.000Z","size":561,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-30T05:33:19.804Z","etag":null,"topics":["containers","docker","dockerfile","flask","heroku","heroku-deployment","linux","python","web"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a7medayman6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-05-05T07:06:01.000Z","updated_at":"2024-09-28T13:18:30.000Z","dependencies_parsed_at":"2023-03-05T01:45:25.111Z","dependency_job_id":null,"html_url":"https://github.com/a7medayman6/Todo-List-Dockerized-Flask-WebApp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7medayman6%2FTodo-List-Dockerized-Flask-WebApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7medayman6%2FTodo-List-Dockerized-Flask-WebApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7medayman6%2FTodo-List-Dockerized-Flask-WebApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7medayman6%2FTodo-List-Dockerized-Flask-WebApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a7medayman6","download_url":"https://codeload.github.com/a7medayman6/Todo-List-Dockerized-Flask-WebApp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234388366,"owners_count":18824433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containers","docker","dockerfile","flask","heroku","heroku-deployment","linux","python","web"],"created_at":"2025-01-17T15:47:39.307Z","updated_at":"2025-09-27T04:31:37.769Z","avatar_url":"https://github.com/a7medayman6.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TO DO LIST - FLASK - DOCKER - Heroku - GITHUB ACTIONS Hands-On\n\n\u003cb\u003eSimple web-project to practice docker and deployment concepts \u003c/b\u003e\n- writing docker files\n- building images\n- running container and manage them\n- persisting data \n- playing around with docker volumes and volume mapping\n- deployment on heroku\n- basic pipeline\n- writing Git-Hub Actions Workflow file\n- Git-Hub Actions to build and push the docker image to the registry on each push/PR\n\n\n## Running \n\n### Try it out live on heroku!\n[TO DO LIST](https://todolist-docker.herokuapp.com/)\n\n### USING DOCKER - PULLING FROM DOCKER HUB\n\n```bash\n# pull the image from docker hub\n$ docker pull a7medayman6/todolist-flask\n\n# create docker volume for the database to keep your tasks everytime you run ir\n$ docker volume create todolist.db\n\n# run the container\n# map port 5000 in the container to 5001 (or any other free port)\n# map the docker volume you created to /app/db \n$ docker run -d -p 5001:5000 -v todolist.db:/app/db a7medayman6/todolist-flask\n\n# open the browser, go to http://0.0.0.0:5001 and here is your todo list up and running\n```\n\n### USING DOCKER - BUILD DOCKER IMAGE\n\n```bash\n# clone the repo into your local host\n$ git clone https://github.com/a7medayman6/Todo-List-Dockerized-Flask-WebApp\n\n$ cd Todo-List-Dockerized-Flask-WebApp\n\n# this will build the docker image from the docker file\ndocker build -t todolist-flask:latest .\n\n# check the build was succesfull\n$ docker images | grep todolist-flask\n# the output should be\n# todolist-flask\n\n# create docker volume for the database to keep your tasks everytime you run it\n$ docker volume create todolist.db\n\n# run the container\n# map port 5000 in the container to 5001 (or any other free port)\n# map the docker volume you created to /app/db \ndocker run -d -p 5001:5000 -v todolist.db:/app/db todolist-flask\n\n# open the browser, go to http://0.0.0.0:5001 and here is your todo list up and running\n```\n### BUILDING\n\n```bash\n$ git clone https://github.com/a7medayman6/Todo-List-Dockerized-Flask-WebApp\n$ cd Todo-List-Dockerized-Flask-WebApp\n$ source env/bin/activate\n$ python3 -r requirements.txt\n$ python3 app.py\n```\n## Volume mapping \n- I was running the app from the docker container on port 5001 and from the local host at port 5000 \n- Mapped the /home/ahmed/todo-flask/db/ directory in the local host to /app/db in the container to have the same data updating in both tabs and to persist the data using this command\n```docker \n$ docker run -it -p 5001:5000 -v /home/ahmed/todo-flask/db/:/app/db/ todolist-flask\n```\n- created a task in the container tab\n\u003cbr\u003e\n\n![Image of the app from container](Screenshots/3.png)\n\n- switched to the local-host tab, and wallah the same task are here, let's say hi back from the local host!\n\u003cbr\u003e\n\n![Image of the app from local-host](Screenshots/4.png)\n\n## Features\n- Add new tasks.\n- Mark task as finished/unfinished.\n- Delete a task.\n\u003cbr\u003e\n\n![add tasks](Screenshots/5.png)\n![mark as finished](Screenshots/6.png)\n![delete tasks](Screenshots/7.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa7medayman6%2Ftodo-list-dockerized-flask-webapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa7medayman6%2Ftodo-list-dockerized-flask-webapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa7medayman6%2Ftodo-list-dockerized-flask-webapp/lists"}