Hypercore supports deployments of any containerized application, regardless of the programming language/frameworks used. All we need to do is dockerize our application, build the image, and push it to a Docker registry. Then, the image can be deployed by Hypercore and be exposed to the public network by the in-built reverse proxy.
As an example, we'll be deploying a sample NextJS app with Hypercore
- Setup the sample app using
npx
$ npx create-next-app --example with-docker nextjs-docker- Build the Docker image, passing Vistara's pre-hosted Docker registry in the tag
$ cd nextjs-docker
$ docker build -t registry.vistara.dev/next-example:latest .- Push the Docker image to the registry
$ docker push registry.vistara.dev/next-example:latest- Send a deployment request to Hypercore, specifying the image tag and the ports we want to expose. The sample application exposes itself at port
3000, so we'll be mapping port443to port3000on the container
# Replace MY_HYPERCORE_IP with the IP address of the deployed hypercore
$ hypercore cluster spawn \
--grpc-bind-addr "$MY_HYPERCORE_IP:8000" \
--ports 443:3000 \
--image-ref registry.vistara.dev/next-example:latest
INFO[0010] Got response: id:"06d0f10a-a6c6-45ae-8f23-770b96851bc3" url:"06d0f10a-a6c6-45ae-8f23-770b96851bc3.deployments.vistara.dev"The image is now deployed and can be accessed at the returned URL 06d0f10a-a6c6-45ae-8f23-770b96851bc3.deployments.vistara.dev
