A full-stack application demonstrating containerized development with a React frontend, Node.js API backend, and PostgreSQL database.
- Frontend: React with Vite, TailwindCSS, and TanStack Query
- Backend: Node.js with Express and PostgreSQL
- Database: PostgreSQL 15.1
- Development: Docker containerization with health checks
├── api-node/ # Node.js backend API
│ ├── src/
│ │ ├── index.js # Express server with routes
│ │ └── db.js # PostgreSQL connection and queries
│ ├── healthcheck/
│ │ └── healthcheck.js # Docker health check script
│ ├── package.json
│ └── README.md
├── client-react/ # React frontend
│ ├── src/
│ │ ├── App.jsx # Main React component with API integration
│ │ ├── main.jsx # React app entry point
│ │ ├── App.css # Component styles
│ │ └── index.css # Global styles with TailwindCSS
│ ├── public/ # Static assets
│ ├── index.html # HTML template
│ ├── vite.config.js # Vite configuration with API proxy
│ ├── package.json
│ └── eslint.config.js
├── .github/
│ └── workflows/
│ └── image-ci.yaml # CI/CD pipeline
├── Makefile # Development commands
└── README.md
git clone <repository-url>
cd Devops-Docker-Appcd api-node
nvm use node 19.4 # or use your Node.js version manager
npm install
cd ..cd client-react
npm install
cd ..make run-postgresmake run-api-nodemake run-client-reactdocker run \
-e POSTGRES_PASSWORD=postgres123 \
-v pgdata:/var/lib/postgresql/data \
-p 5432:5432 \
postgres:15.1-alpinecd api-node
DATABASE_URL=postgres://postgres:postgres123@localhost:5432/postgres npm run devcd client-react
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:3000
- Health Check: http://localhost:3000/ping
- Real-time Data: Frontend displays current timestamp from database
- API Proxy: Vite proxy configuration routes /api/node/* to backend
- Health Monitoring: Docker health check endpoint
- Hot Reload: Both frontend and backend support hot reloading
- Modern Stack: Uses latest React 19, Vite 7, and TailwindCSS 4
GET / # Returns current timestamp from database with API identifier
GET /ping # Health check endpointAPI Node
PORT - Server port (default: 3000)
DATABASE_URL - PostgreSQL connection string
DATABASE_URL_FILE - Path to file containing database URL.github/workflows/image-ci.yaml
The project includes GitHub Actions workflow in image-ci.yaml for automated builds and deployments.
- React 19
- Vite 7
- TailwindCSS 4
- TanStack Query 5
- Axios
- ESLint
- Node.js
- Express 5
- PostgreSQL (pg)
- Morgan (logging)
- Docker
- GitHub Actions
- Make
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request