Exopods Docs
DashboardPricing
  • Getting Started
    • Introduction
  • Knowledge Base
    • Supported Apps
    • Terms/Misc
    • Understand Pricing
    • Why Exopods?
  • Tutorials
    • Getting Started
      • How to Deploy Docker Apps on Exopods?
      • How to deploy Github Project on Exopods?
    • Deploy docker images using private registries
      • AWS ECR
      • Google GCR
      • JFrog
      • Dockerhub
    • Deploy your web app on Exopods
      • Effortless deploy React apps with Exopods
      • Deploy Node.js application using Exopods
    • Deploy One Click Templates
      • Grafana Template deployment on Exopods
      • Deploying portainer in Exopods
      • Deploying Gitea template on Exopods
  • News
    • What's new in Exopods?
  • help and support
    • Common Issues?
  • knowledge share
    • Managed K8s Vs Exopods?
    • How to configure SSL in Exopods?
Powered by GitBook
On this page
  • Prerequisites
  • Getting Your React App Ready
  • Building and Uploading Your Docker Image (Think Packaging Your App)
  • Configure Your Deployment on Exopods
  • Deploy Your App
  • Conclusion
  1. Tutorials
  2. Deploy your web app on Exopods

Effortless deploy React apps with Exopods

This guide will make deploying your React app to Exopods a breeze! In just a few steps, you'll have your app up and running with a public URL, accessible from anywhere.

PreviousDeploy your web app on ExopodsNextDeploy Node.js application using Exopods

Last updated 9 months ago

Prerequisites

  • Node.js and npm: Ensure you have Node.js and npm installed on your system. You can download them from .

  • Docker: Install Docker Desktop from .

  • Docker Hub account: Create a free account on Docker Hub at .

  • Exopods account: Sign up for a free Exopods account at .

  • Basic understanding of React: Familiarity with React concepts and development is helpful.

  • Basic knowledge of Docker: A basic understanding of Docker containers and images is beneficial.

Deploying your React app on Exopods is a breeze. This guide will walk you through the entire process, ensuring your app is live and accessible in just a few steps. In just a few steps, you can have your application up and running with a public URL. Let's dive in!

Getting Your React App Ready

a. Build for Production:

Before deployment, we need to create an optimized version of your React app. Run the following command in your terminal:

npm run build

This will generate a special build folder containing all the necessary files for deployment.

b. Create a Dockerfile (Think of it as instructions):

In the main directory of your React project, create a new file named Dockerfile. This file tells Docker how to build your application into a container. Add the following content to your Dockerfile:

# Use a lightweight image for React apps
FROM node:16-alpine

# Set the working directory
WORKDIR /app

# Copy your app's code
COPY package*.json ./
RUN npm install

# Copy the rest of your app files
COPY . .

# Expose port 80 (standard for web apps)
EXPOSE 80

# Start the app using npm run start (modify if your start script is different)
CMD [ "npm", "start" ]

Building and Uploading Your Docker Image (Think Packaging Your App)

1. Build the Image:

Now that you have the Dockerfile, let's build the image using this command in your terminal:

docker build -t <your-dockerhub-username>/react-app .

Replace <your-dockerhub-username> with your actual username on Docker Hub. This creates a package containing your React app based on the instructions in the Dockerfile.

2. Upload the Image (Think Storing Your Package Online):

  • Once logged in, you'll find a "Push Image" section. Follow the instructions to upload the image you just built.

3. Copy the Image URL:

After uploading, Docker Hub will provide a unique URL for your image. Copy this URL, you'll need it in the next step.

Configure Your Deployment on Exopods

1. Log in to Exopods:

2. Create a New Deployment:

Look for a button or menu option that says "Deploy Now" or "Create Deployment."

3. Configure Your Deployment (Think Settings):

Exopods will ask for some details:

  • Container Name: Give your app a friendly name (e.g., "my-awesome-react-app").

  • Image URL: Paste the Docker Hub image URL you copied earlier.

  • Port: Most web apps use port 80, so leave it unless your app uses a different port (check your Dockerfile if unsure).

  • Environment Variables (Optional): If your app needs specific settings, you can add them here.

Deploy Your App

Once you've filled in the details, click the "Deploy" button. Exopods will take care of the rest, setting up your app in the cloud!

After deployment, Exopods will provide a public URL. This is the web address where your React app is now live! You can copy and paste this URL into any web browser to access your running application.

Conclusion

Congratulations! You've successfully deployed your React app using Docker and Exopods. Now it's accessible to anyone with the URL!

Log in to your Docker Hub account at .

Head over to the Exopods website () and log in to your account (or create a new one if needed).

https://nodejs.org/en/download/package-manager
https://www.docker.com/
https://hub.docker.com/login
https://exopods.com/
https://hub.docker.com/
https://exopods.com/