How to deploy React app

I’m looking for references on how to deploy a React app in Aptible.

My app is dockerized and I’m using the Direct Docker Image Deploy option. The app is deployed successfully but when I try to create an endpoint the following error ocurrs:

Your Docker image must EXPOSE a port to provision an Endpoint, add an EXPOSE directive in your Dockerfile.

I thought that Aptible was the responsible for receiving the requests and serving the assets that are in the container.

Is there something that I’m missing?

Hey maximiliano.d,

Thanks for reaching out, sorry for the delay in response.

You are receiving Your Docker image must EXPOSE a port to provision an Endpoint, add an EXPOSE directive in your Dockerfile , because you must expose a port for the container. The endpoint forwards the HTTP requests to your container with this port. The endpoint will always fail to provision without an EXPOSE $port inside your Dockerfile.

Aptible is responsible for forwarding the requests from the endpoint to the container, but we cannot do so without a port exposed in the container.

Please let me know if you have any additional questions!
-Graham