https://github.com/hostari/docker-compose-sample
Simple Docker Compose todo app with PostgreSQL and Node.js
https://github.com/hostari/docker-compose-sample
Last synced: 4 months ago
JSON representation
Simple Docker Compose todo app with PostgreSQL and Node.js
- Host: GitHub
- URL: https://github.com/hostari/docker-compose-sample
- Owner: hostari
- Created: 2025-10-23T03:22:05.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-11-08T03:20:14.000Z (7 months ago)
- Last Synced: 2025-11-08T05:27:44.053Z (7 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Todo App
A simple todo application built with Node.js, Express, and PostgreSQL, fully containerized with Docker Compose.
## Features
- Simple and clean UI for managing todos
- PostgreSQL database for persistent storage
- Automatic database initialization
- Fully containerized with Docker
## Prerequisites
- Docker
- Docker Compose
## Quick Start
1. Clone this repository or navigate to this directory
2. Start the application:
```bash
docker compose up
```
3. Open your browser and visit:
```
http://localhost:3000
```
4. Start adding todos!
## Stopping the Application
To stop the application, press `Ctrl+C` in the terminal, then run:
```bash
docker compose down
```
To remove the database volume as well:
```bash
docker compose down -v
```
## Project Structure
```
.
├── docker-compose.yml # Docker Compose configuration
├── Dockerfile # Node.js app container definition
├── package.json # Node.js dependencies
├── server.js # Express server with todo logic
└── README.md # This file
```
## Environment Variables
The application uses the following default credentials (defined in `docker-compose.yml`):
- Database: `tododb`
- User: `todouser`
- Password: `todopass`
## Ports
- Application: `3000`
- PostgreSQL: `5432`