Sign inSign up

berkesayin/todo-app

By berkesayin

•Updated over 2 years ago

Image for todo app that is used with mongo container. Get the compose file in overview.

Image
0

91

berkesayin/todo-app repository overview

⁠Multi-Container To Do App

This is the todo application image of the project which also uses container from mongo image to store data. Use Docker Compose to run the application on 2 containers comprised of todo-app, and todo-database (MongoDB) components.

2 Containers running for the application:

  • image: mongo:6
  • image: berkesayin/todo-app:1.0

Get docker-compose.yaml file.

services:
  todo-app:
    image: berkesayin/todo-app:1.0
    depends_on:
      - todo-database
    environment:
      NODE_ENV: production
    ports:
      - 3000:3000
      - 35729:35729
    develop:
      watch:
        - path: ./app/package.json
          action: rebuild
        - path: ./app
          target: /usr/src/app
          action: sync

  todo-database:
    image: mongo:6
    volumes: 
      - database:/data/db
    ports:
      - 27017:27017

volumes:
  database:
⁠Build
docker-compose build
⁠Images Pulled
docker images
⁠Run containers
docker-compose up
⁠Check containers
docker ps

Go to http://localhost:3000/⁠ and add new todo item.

Reference, docker docs: https://docs.docker.com/⁠

Tag summary

Content type

Image

Digest

sha256:bca466400…

Size

62.2 MB

Last updated

over 2 years ago

docker pull berkesayin/todo-app:1.0