Skip to content

sidharth-chauhan/three-tier-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

3-Tier Web Application

This is a Docker-based 3-tier web application consisting of a React frontend, Flask backend API, and PostgreSQL database.

Architecture

  • Frontend: React application (port 3000)
  • Backend: Flask REST API (port 5000)
  • Database: PostgreSQL (port 5432)

Prerequisites

  • Docker
  • Docker Compose

Getting Started

Clone the repository

  1. Start the application: docker-compose up --build

  2. Access the application:

API Endpoints

  • GET /api/users - Retrieve all users
  • POST /api/users - Create a new user

Environment Variables

Backend

  • DATABASE_URL: PostgreSQL connection string

Frontend

  • REACT_APP_API_URL: Backend API URL

Database

  • POSTGRES_USER: Database user
  • POSTGRES_PASSWORD: Database password
  • POSTGRES_DB: Database name
  1. Rebuild containers after changes:
docker-compose down
docker-compose up --build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors