https://github.com/docker/getting-started-todo-app
Sample application to get started with Docker
https://github.com/docker/getting-started-todo-app
Last synced: 9 months ago
JSON representation
Sample application to get started with Docker
- Host: GitHub
- URL: https://github.com/docker/getting-started-todo-app
- Owner: docker
- License: apache-2.0
- Created: 2024-02-02T17:14:36.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-08T11:24:49.000Z (over 1 year ago)
- Last Synced: 2025-04-09T16:20:01.465Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 4.34 MB
- Stars: 53
- Watchers: 4
- Forks: 198
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Getting Started Todo App
This project provides a sample todo list application. It demonstrates all of
the current Docker best practices, ranging from the Compose file, to the
Dockerfile, to CI (using GitHub Actions), and running tests. It's intended to
be a well-documented to ensure anyone can come in and easily learn.
## Application architecture

This sample application is a simple React frontend that receives data from a
Node.js backend.
When the application is packaged and shipped, the frontend is compiled into
static HTML, CSS, and JS and then bundled with the backend where it is then
served as static assets. So no... there is no server-side rendering going on
with this sample app.
During development, since the backend and frontend need different dev tools,
they are split into two separate services. This allows [Vite](https://vitejs.dev/)
to manage the React app while [nodemon](https://nodemon.io/) works with the
backend. With containers, it's easy to separate the development needs!
## Development
To spin up the project, simply install Docker Desktop and then run the following
commands:
```
git clone https://github.com/docker/getting-started-todo-app
cd getting-started-todo-app
docker compose up -d
```
You'll see several container images get downloaded from Docker Hub and, after a
moment, the application will be up and running! No need to install or configure
anything on your machine!
Simply open to [http://localhost](http://localhost) to see the app up and running!
Any changes made to either the backend or frontend should be seen immediately
without needing to rebuild or restart the containers.
To help with the database, the development stack also includes phpMyAdmin, which
can be access at [http://db.localhost](http://db.localhost) (most browsers will
resolve `*.localhost` correctly, so no hosts file changes should be required).
### Tearing it down
When you're done, simply remove the containers by running the following command:
```
docker compose down
```