This directory contains files and configurations for deploying gRPC Web Explorer outside of Vercel's managed environment. These files are not required for standard Vercel deployments.
-
Dockerfile- Multi-stage Docker build configuration for production deployment- Uses Node.js 22 Alpine for minimal image size
- Builds Next.js application with production optimizations
- Includes custom port auto-detection server
-
docker-compose.yml- Docker Compose orchestration- Single-service configuration
- Persistent cache volume for service discovery results
- Exposes port 3000 by default
-
start-server.js- Custom Node.js production server- Automatic port detection (starts at 3000, increments if unavailable)
- Prevents deployment failures due to port conflicts
- Uses Next.js standalone mode
systemd.service- Linux systemd service configuration- For running as a system service on Linux servers
- Includes security hardening options
- Automatic restart on failure
test-grpc-reflection.js- Comprehensive gRPC reflection test suite- Validates service discovery functionality
- Tests method invocation and type definitions
- Useful for local development and troubleshooting
From the project root:
# Build and start
yarn docker:build
yarn docker:up
# View logs
yarn docker:logs
# Stop
yarn docker:downOr use docker-compose directly:
cd deployment
docker-compose up -d
docker-compose logs -f
docker-compose downFrom the project root:
# Production build
yarn build:prod
# Start server (auto-detects available port)
yarn start:prod# Copy service file
sudo cp deployment/systemd.service /etc/systemd/system/grpc-explorer.service
# Edit paths in service file as needed
sudo nano /etc/systemd/system/grpc-explorer.service
# Enable and start
sudo systemctl enable grpc-explorer
sudo systemctl start grpc-explorer
sudo systemctl status grpc-explorer# Ensure the dev server is running
yarn dev
# In another terminal
yarn test:grpcNODE_ENV- Set toproductionfor production buildsPORT- Desired port (default: 3000, auto-increments if unavailable)GRPC_ENDPOINTS- Optional comma-separated list of default endpoints
- Vercel Deployments: These files are not used for Vercel deployments. Vercel handles building and serving automatically.
- Port Auto-Detection: The custom server (
start-server.js) automatically finds an available port, preventing deployment failures. - Cache Persistence: Docker deployment includes a persistent volume for localStorage cache simulation.
- Security: The systemd service includes basic security hardening (ProtectSystem, NoNewPrivileges, PrivateTmp).
Ensure you're running docker commands from the project root or using the yarn scripts which handle paths automatically.
The custom server automatically finds an available port. If using Docker, modify the port mapping in docker-compose.yml.
Ensure the application is running (dev or production) before running the test script. The test script connects to http://localhost:3000 by default.