This repository includes Docker configuration for both frontend and backend services, making it easy to run the entire application with a single command.
To run the entire application (frontend, backend, and MongoDB):
docker-compose upThis will:
- Build and start the frontend service (accessible at http://localhost:3000)
- Build and start the backend service (accessible at http://localhost:5000)
- Start a MongoDB instance (accessible at mongodb://localhost:27017)
To run only the frontend service:
cd frontend
docker-compose upTo run only the backend service (note: this requires MongoDB to be running):
cd backend
docker build -t pear-backend .
docker run -p 5000:5000 pear-backendFor development, you can use Docker Compose with volume mounts to enable hot-reloading:
docker-compose upAny changes you make to the frontend or backend code will be automatically reflected in the running containers.
For production deployment, you can build optimized Docker images:
# Build frontend image
docker build -t pear-frontend:latest ./frontend
# Build backend image
docker build -t pear-backend:latest ./backendThese images can be pushed to a container registry and deployed to your production environment.
This repository includes GitHub Actions workflows that automatically build and test Docker images for both frontend and backend services. When changes are pushed to the main branch, the workflows also publish the images to GitHub Container Registry.
- Frontend:
ghcr.io/[repository-owner]/pear/frontend:latest - Backend:
ghcr.io/[repository-owner]/pear/backend:latest
To use these images:
docker pull ghcr.io/[repository-owner]/pear/frontend:latest
docker pull ghcr.io/[repository-owner]/pear/backend:latestReplace [repository-owner] with your GitHub username or organization name.