Skip to content

indrasisdatta/react-vite-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a simple React POC using the below technologies:

Docker configuration

Ref doc

Docker build manual commands (Dev build):

docker build -t react-vite-poc . -f .\Dockerfile.dev

docker run -p 5173:5173 react-vite-poc

URL: http://localhost:5173/

Docker single command using docker-compose

  • Local environment: Uses Dockerfile.dev to build React app and serve using npm run build, just as we do it in local. docker-compose --env-file .env.local up -d

  • Production environment: Uses Multi-stage build to build Docker image.
    Stage 1 - Build React app.
    Stage 2 - Use nginx to serve the builr React app.
    docker-compose --env-file .env.prod up -d

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published