This is a Next.js project bootstrapped
with create-next-app.
This app is deployed to AWS on an ECS cluster. To deploy changes you will build and tag the Docker image locally, then push to ECR.
Use the latest tag when building and deploying; otherwise, you'll need to update the ECS service definition found
in deploy/.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devRun the generate-grpc.sh script to create gRPC stubs for use in API routes and route handers.
If you encounter an error related to protoc not being found, you may need to set up a symlink. Run the following
command:
ln -s /opt/homebrew/opt/protobuf@3/bin/protoc /path/to/your/project/node_modules/grpc-tools/bin/protocOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and
load Inter, a custom Google Font.
Follow these steps to build the app and prepare a Docker image for deployment:
docker build -t grpchat-web .docker run -p 3000:3000 grpchat-webVisit http://localhost:3000 in your browser. If all is well continue onto the next step.
docker tag grpchat-web:latest 413025517373.dkr.ecr.us-east-1.amazonaws.com/grpchat-web:latestdocker push 413025517373.dkr.ecr.us-east-1.amazonaws.com/grpchat-web:latestIf you're really confident you can run yarn run deploy to build/tag/push for you.
Make sure the bash script is executable:
chmod +x ./scripts/deploy.shTo learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!